Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

Created Unassigned: Format Excel(xlsx)'s line graph do not display [11976]

$
0
0
I use NPOI 2.0.1Beta1 to test:
input data to a format excel(xlsx) which has a line graph and save as
but there is a error when i open the result excel
the line graph cann't display

my code as :
```
Dim stream As FileStream
stream = New FileStream("C:\test\hello.xlsx", FileMode.Open)
Dim workbook = New XSSFWorkbook(stream)

Dim sheet = workbook.GetSheet("Sheet1")
sheet.CreateRow(1).CreateCell(1).SetCellValue("world")

sheet.CreateRow(7).CreateCell(2).SetCellValue(1)
sheet.GetRow(7).CreateCell(3).SetCellValue(2)
sheet.GetRow(7).CreateCell(4).SetCellValue(3)
sheet.GetRow(7).CreateCell(5).SetCellValue(1)
sheet.GetRow(7).CreateCell(6).SetCellValue(2)

Dim sw = File.Create("C:\test\test.xlsx")
workbook.Write(sw)
sw.Close()
MsgBox("OK")
```

PS:
the same code ,only change "XSSFWorkbook" to "HSSFWorkbook",
and change excel to "xls", result excel's line graph is OK

Viewing all articles
Browse latest Browse all 1621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>