I have text that contains ascii character 22, and maybe some other random ones as well. When I try to write these to the spreadsheet it acts like it worked but then I can't open the file in Excel (see code). I will probably end up writing code to clean these out of my string, but it would be nice to know if this is by design or not.
----Code----
Imports OfficeOpenXml
Imports System.IO
Module Module1
Sub Main()
Dim savepath As String = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".xlsx")
Using xlPackage As New ExcelPackage()
Dim xlWorkSheet = xlPackage.Workbook.Worksheets.Add("Test Sheet")
xlWorkSheet.Cells(1, 1).Value = " " 'ascii value 22 goes here, codeplex won't let me post bug with that value in the body though :)
xlPackage.SaveAs(New FileInfo(savepath))
End Using
Console.WriteLine("Saved to " + savepath)
Console.ReadLine()
End Sub
End Module
Comments: Hi, I found exception like this '', hexadecimal value 0x1F, is an invalid character while exporting to Excel 2007 I am using EPPlus version 3.0.0.2 if anybody know this type of issue reply me... Thanking You Sharandeep
----Code----
Imports OfficeOpenXml
Imports System.IO
Module Module1
Sub Main()
Dim savepath As String = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".xlsx")
Using xlPackage As New ExcelPackage()
Dim xlWorkSheet = xlPackage.Workbook.Worksheets.Add("Test Sheet")
xlWorkSheet.Cells(1, 1).Value = " " 'ascii value 22 goes here, codeplex won't let me post bug with that value in the body though :)
xlPackage.SaveAs(New FileInfo(savepath))
End Using
Console.WriteLine("Saved to " + savepath)
Console.ReadLine()
End Sub
End Module
Comments: Hi, I found exception like this '', hexadecimal value 0x1F, is an invalid character while exporting to Excel 2007 I am using EPPlus version 3.0.0.2 if anybody know this type of issue reply me... Thanking You Sharandeep