|
Post by angelo2449 on May 19, 2023 23:42:39 GMT -5
Hi guys,
I would like to directly extract data from an Excel file.
Has anyone written anything about it?
Thank you.
|
|
|
Post by Rod on May 20, 2023 1:36:47 GMT -5
Not looked at the issue for a while now but if I recall correctly it is near impossible to extract the data directly. This is because of the complex file structure that excel creates. I have tried searching out streams of data on several occasions and never been successful.
The usual way to get data from excel is to export a csv file of the data you are interested in. If you are familiar with excel macros this can be automated within excel, it can be timed and regular but always excel must initiate the export. Liberty can then pick up the csv file and import that.
But you never know someone else may have mastered it.
|
|
|
Post by angelo2449 on May 20, 2023 6:56:08 GMT -5
Thanks Rod, i think the .csv file, is the only solution.
|
|
|
Post by tsh73 on May 20, 2023 10:06:46 GMT -5
It really depends on task at hand (and if you have Excel installed or not). You could: * script things in Excel to get all sheet or explicitely data you are after * Run some command line convertor to get CSV file (I just read open office/ libre office include such tool) * Script something that could read Excel files to get data. Like, python+pandas * Probably even access excel file via ODBC, but it's not really easy with LB and worth it only if you already do DB wilth Liberty Basic.
|
|
|
Post by angelo2449 on May 20, 2023 12:26:26 GMT -5
In my case, I need some data present in Excel. So I think I could insert a command in Excel that saves the data I need to load them with the program I'm writing.
|
|