excelcreateworkbook(); excelsetsheet("Sheet1"); excelwritenum(1,1,1); excelsave("NewWorkBook.xlsx"); excelclose(0);
Hi, On using this script I'm not able to create an Excel workbook with the specified sheet and data.
Regards,
Arun KR
excelcreateworkbook(); excelsetsheet("Sheet1"); excelwritenum(1,1,1); excelsave("NewWorkBook.xlsx"); excelclose(0);
Hi, On using this script I'm not able to create an Excel workbook with the specified sheet and data.
Regards,
Arun KR
Hi @Arun Kr, was Jordan Johnson's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.
Looks like the Excel Interface expects paths with windows-style slashes for the file path. So I made a test model (so that modeldir() becomes valid) and then used string.replace() on the slashes:
excelcreateworkbook(); excelsetsheet("Sheet1"); excelwritenum(1,1,1); excelsave(modeldir().replace("/", "\\", 1) + "NewWorkBook.xlsx"); excelclose(0);
With this change, it seems to work.
I'll add a case to the dev list to improve this in the future.
@Arun Kr This issue is fixed in 23.0.13 and 23.2.3 released today.
8 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved