jjensen / lua-xls

8 stars 5 forks source link

Excel file can not contains non-ANSI characters #2

Open shawnye opened 9 years ago

shawnye commented 9 years ago
        local workbook = xls.Workbook(filename)   -- can not use utf8 filename
    local sheets =  workbook:GetTotalWorksheets()
     print("total sheets=" .. sheets)  --1, OK
     if sheets > 0 then
            local sheet = workbook:GetWorksheet(0)  --OK only if contains ANSI characters
            io.write("sheet name=")
            print ( sheet:GetSheetName(0) ) 
            local cell = sheet:Cell(0, 1)  --wstring
            if cell ~= nil then
                io.write(("%10s"):format(tostring(cell:GetWString())))  ----OK only if contains   ANSI characters
            end
     end

In summary ,the Excel file can not contains non-ANSI characters, or 'APPCRASH' would happen on MSVCR100.dll ,code=c0000005 (I built it with vs 2010 express)

Is there any way workaround ? Thank you!

bacTlink commented 8 years ago

I meet the same problem after compiling it under CentOS7. Looking forward to someone fixing it.