Skip to content

Excel file can not contains non-ANSI characters #2

Description

@shawnye
        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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions