question

Khalid Kayal avatar image
0 Likes"
Khalid Kayal asked tannerp commented

How to export FlexSim Table to Excel File?

I am trying to utilize the excelexporttable() function to simply export a table from flexsim to an excel file, but it doesn't work with me as it works with excelimporttable() function.

Here's my code:

excelopen (FilePath);

excelsetsheet ("Sheet1");

excelexporttable ("Test" ,1,1,37,1);

excelclose (0);

What am I doing wrong here?

Thanks

FlexSim 18.1.2
excel export
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Joshua S avatar image
2 Likes"
Joshua S answered tannerp commented

You need to use

excelclose(1);

to save the data to the file, a 0 closes the connection without saving changes.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Khalid Kayal avatar image Khalid Kayal commented ·

Worked, thanks Joshua

0 Likes 0 ·
asb.p avatar image asb.p commented ·

Hello Joshua,

How to get column headers also included in the export?

Thanks,

Praneeth Akondi

0 Likes 0 ·
tannerp avatar image tannerp asb.p commented ·

@asb.praneeth,

You might have better luck asking a new question so that more people can see it. This question is rather old and many users will not see your comment here. To try and answer your question, however, I would recommend testing different numbers of starting rows and columns (the second and third parameters in the excelexporttable command). If that doesn't work, you can use an exporttable command separate from Excel and put 1 in both the third and fourth parameters to indicate the use of the row and column headers. This will save a CSV file with all the information you need that you can open in Excel.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.