Jump to content

Ivaylo Stanchev

Vectorworks, Inc Employee
  • Posts

    12
  • Joined

  • Last visited

Reputation

6 Neutral

Personal Information

  • Occupation
    SOFTWARE ENGINEER
  • Location
    Bulgaria

Contact Info

  • Skype
    d.host.bg

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, Because of the two Excel file formats - XLSX and XLS, there are two different programing codes for each of the formats. To know which one to execute we need to know the extension or the whole name of the file. Assuming that anyway, the user will know the full name ( hardcoded or taken from file chooser) we decided to use EXL_NewBook(filePath) instead of EXL_NewBook(fileExtension). EXL_NewBook(filePath) returns TRUE because the initial XLS or XLSX code was successfully executed. But the real file is created only after calling EXL_SaveAndCloseBook(filePath). Technically, an empty string could be used in EXL_NewBook(''). In this case, the "XLSX" code will be executed by default. But if at the end, the book is saved and closed as "*.XLS", the file extension will differ from the file format. And an error will appear when opening this file using the Excel application. Here is a short script example. I hope you find it useful. PROCEDURE TestExcel; VAR newname : STRING; res : BOOLEAN; shNum : INTEGER; BEGIN newname:= 'C:\\Temp\\Test.xlsx'; res := EXL_NEWBOOK(''); res := EXL_ADDSHEET('NEW_SHEET'); res := EXL_GETSHEETINDEX('NEW_SHEET',shNum); IF ( res = TRUE) THEN BEGIN res := EXL_SETCELLSTRING(shNum,0,0,newname); END; res := EXL_SAVEANDCLOSEBOOK(newname); END; Run(TestExcel); Best regards, Ivaylo.
  2. @SLFY Hi, Here is the list of supported functions. Means that they should be translated well form Excel to Vectorworks and vice versa. Named ranges are not supported yet. And the sheet referencing also is not supported for now. Therefore if you import cell "=SUM(MyRange)" it will be placed in the Vectorworks the same way. And thus "=SUM(MyRange)" will show an #VALUE! error. Thanks, Ivaylo.
  3. @WhoCanDo , It's not a bad idea. I'll think about it. But what about the name of the exported excel file?
  4. Hi @WhoCanDo , About the I'm attaching a video. Can you please look at it and tell me what is wrong there? I don't argue. I'm just trying to understand. Also, what WSExport (WSName : string; Tab, All Rows, Recalc, Open : boolean) should do? Do you mean it should launch the export dialog, with name and settings according to the parameters, i.e. to substitute DoMenuTextByName ('Export Worksheet', 0)? Thank you, Ivaylo. Screen Recording (19.11.2020 г. 16-01-58)_x264.mov
  5. @WhoCanDo If you are using SP2 this should work for you. I just tested with a SP1 and a SP2 builds. If you are using SP2 and this still does not work, please let me know. Thank you, Ivaylo.
×
×
  • Create New...