Interesting... For this portion of code:

https://github.com/360EntSecGroup-Skylar/excelize/blob/master/rows.go#L76-L85

The xml decoder returns row and col token types for  1.8.3 but rushes into 
an EOF for 1.9

If the document gets re-saved with LibreOffice for example, it works, so it 
may be invalid, but still... maybe some changes in the Xml parsed inner 
workings ?

On Monday, 28 August 2017 14:55:25 UTC-4, G Shields wrote:
>
> here is the xlsx data file
> FYI this fails on both mac and ubuntu with 1.9
>
>
> On Friday, August 25, 2017 at 3:10:40 PM UTC-7, G Shields wrote:
>>
>> Under 1.8.3 the program run:
>> package main
>>
>> import (
>>     "fmt"
>>     "os"
>>     "strconv"
>>
>>     "github.com/Luxurioust/excelize"
>> )
>>
>> func checkErr(err error) {
>>     if err != nil {
>>         fmt.Println(err)
>>         os.Exit(1)
>>     }
>>
>> }
>> func main() {
>>
>>     xlsx, err := excelize.OpenFile("test.xlsx")
>>     checkErr(err)
>>     mysheet := xlsx.GetSheetName(1)
>>     index := xlsx.GetSheetIndex(mysheet)
>>     rows := xlsx.GetRows("Sheet" + strconv.Itoa(index))
>>     for _, row := range rows {
>>         for _, colCell := range row {
>>             fmt.Print(colCell, "\t")
>>         }
>>         fmt.Println()
>>     }
>> }
>>
>> With results of:
>> na    Apple    Orange    Pear    
>> Small    2    3    3    
>> Normal    5    2    4    
>> Large    6    7    8
>> Success: process exited with code 0.
>>
>> Under 1.9 I get no data and no errors:
>> Success: process exited with code 0.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to