DATA AHEAD toolkit support Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

XLR8: could "Open Create Workbook" self open any type?

Dear Hajo,

Could "Open Create Workbook" self open any type of Excel file (XLS,XLT,XLSX,XLTX,XLSM) ? As users, we don't need the polymorfic format.

Regards,

Daniel

0 Kudos
Message 1 of 5
(5,382 Views)

Hi daniel,

thanks for your hint!

We discussed it internaly and think that there is no big improvment by changing the functionality of "Open Create Workbook" as you mentioned. We also want to guarantee the compatibility to older versions of XLR8.

Workaround for your case:

- design a case structure with an enum connected and the "open create workbook" inside. So the functionality will be like you descriped

Greetings,

Hajo

Message 2 of 5
(4,295 Views)

Dear Hajo,

That's what I did already, but it's based on file extension. (Get File Extension.vi)

It has two risks:

- I don't known all possible Excel extensions that you can open.

- Fake Excel files can be named with Excel extensions. NI told to make TXT[tab separated] file named with XLS extension to be opened in Excel by File Explorer.

Regards,

Daniel

0 Kudos
Message 3 of 5
(4,295 Views)

Hi Daniel,

what you suggest would be an automatic file header analysis functionality. This, while desirable, would require quite a bit of development effort. Still, it would be prone to errors, as you would have to deeply analyze the file to make sure it works. You would have to check for *.xls file headers, *.xlsx file headers (i.e. ZIP files) and then some.

Here is what I suggest: Limit your search by file extension, as you do. Try to open it with an implementation of XLR8 Open. If an error is thrown  it cannot be opened. Try the other implementation. If it still does not work, it is not a compatible file and you go to the next file or tell the user to select a different one.

Peter

CLD | Alliance Partner | Web data storage and visualization | daq.io
0 Kudos
Message 4 of 5
(4,295 Views)

Dear Peter,

Good sugestion. I did this:

Image 002.png

Regards,

Daniel

Message 5 of 5
(4,295 Views)