0

I am trying to create a excel file from Matlab with data for multiple cases. The excel file should look something like this:

Case #|____________________________Line 1_____________________________________________|_______ Line 2 _____________ ...
      |______Node 1______|______Node 2______|______Node 3______|...|______OverAll_____|
      | Min|Max|Mean|Std | Min|Max|Mean|Std | Min|Max|Mean|Std |...| Min|Max|Mean|Std |
      |_______________________________________________________________________________|
     1|    |   |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
     2|    |   |    |    |    |    |    |    |    |    |    |    |    |    |    |    |

I have the data for each Line>Node in a structured format which I can read through a for loop for a given case. How can I write the values in an excel file? I don't know how to get the next available cell range where I need to place the value. Also, how can I generate such header text dynamically. The number of Nodes and properties (Min/Max/Mean/Std) might change in future.

Thank you for your help. Any suitable tutorial which teaches little advanced xlswrite commands will also help.

1 Answer 1

1

Use Activexserver to import whole Excel Functionality in MATLAB using

hApp = actxserver('Excel.Application')

Rest you can use all methods available to Excel Application in MATLAB

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your response. However, I was able to write excel file just using xlswrite command with providing correct column name. The column name is created using another function which converts column number to respective excel column name (1 = A, 2 = B etc. ) . But, then I found that creating excel file is very slow and since I need large data analysis method, I switched to writing a CSV file instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.