Write array data to excel?

Hello
I'm doing some simple tests writing data from Ansys workbench mechanical to an existing Excel document. The small script I have works when looping through data in the array and write it elementwise to Excel. For efficiency purpose I would like to write all data in the array "at once" (without looping) but have some difficulties achieving this.
1) Elementwise - ok
2) Array-wise
Below is what I tried with, but this gives some sort of exception result, which I don't know how to interpret. Something is obviously wrong here, but what?
Any suggestions or ideas that I can try out?
Best regards,
Erik
Best Answer
-
Hello! This is an interesting problem although whilst efficiency is beneficial, do you need this process to be more efficient? The routine you're looking for is still going to do it row-by-row under the hood, but it may be doing it in C# or some other compiled language (I am not super familiar with ACT but I know Python very well!).
0
Answers
-
Hello!
Sorry for not being active after posting a question, but have been busy with other things and not logged in to the forum for a while.I have used this row-by-row writing in a larger script now, the correct results are written and the script seems to do what it should. The "array-wise" alternative is thus nice-to-have and not really needed. I was thinking that maybe there could be something similar to the apdl *vput command, but for Mechanical/python/excel/array.
Using a routine from C# or other compiled language would be way over my head, so I stick with the element-wise writing for now!
Best regards,
Erik0