View Single Post
12/11/14, 12:08 PM   #3
dopiate
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 142
Originally Posted by CausaMortis View Post
Anyone has a tutorial or link that shows me how I can convert data stored in savedvariabels to an excel database?

Tx
For what purpose? Depending on the answer I have different suggestions.

My current addon does this every time it's run (GSA) -- it is the only way to get data from "in game" to an external program. Mine creates a database.

depending on the addon you are trying to do this with I could just give you my 100% working subroutine and with a few minor changes it would work as a VBS.

It's basically - open .lua file
read line by line
trim spaces - check if it's something you are trying to keep
if yes add it to a string + ","
decide when to insert a line break
repeat until EOF

when done write all to a .csv

there are certain tricks to making it more efficient like

If InStr(line, "},") > 0 or If InStr(line, "{,") > 0 then
ignore and read next line

-d

Last edited by dopiate : 12/11/14 at 12:19 PM.
  Reply With Quote