I want to read a xls file and then parse it. How can i do it with Lua? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This isn’t a duplicate, since he actually just wants to read from an excel file and parse the data – not manipulate an excel object.
Whenever I had to do this, I used luasql using ADO. at the most basic level, something like this is what you’d use to open a db connection and read excel data from it if you know how many fields are going to be in each row of your query.
if you don’t know how many fields you’re getting back, you can do something like this:
make sure to close your cursors/connections/environments when you’re done with them. also, you’ll want to verify that the connection string above will work with your version of excel. the easiest way to determine which connection string you need is to go to http://www.connectionstrings.com and browse for the correct one.