The source code can be checked out from GitHub:
https://github.com/unvell/ReoGrid
It would be great if you can add it!
]]>我遇到一个奇怪的现象,
Form上面只有2个控件,ReoGrid和Radio Button,
在ReoGrid绑定[AfterCellEdit]事件,Radio Button绑定[点击]事件,
在ReoGrid控件输入Cell內容后按下回车键,
会触发[AfterCellEdit]事件,
然后不知为何地接着又触发Radio Button的[点击]事件?
(为了实验,[AfterCellEdit]事件是空的,还是发生,发现ReoGrid的[CellDataChanged]事件也会如此)
目前暂时解法:
将所有Radio Button控件的属性[TabStop]改成false
this is the line i got the error
grid.Load(@"D:\ExcelWithSimpleGraph.xlsx", unvell.ReoGrid.IO.FileFormat.Excel2007);
this is the error info
StackTrace:
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadChart(Worksheet rgSheet, ChartSpace chartSpace)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadGraphic(Document doc, Worksheet rgSheet, Drawing drawingFile, GraphicFrame graphicFrame)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadDrawingObjects(Document doc, Worksheet sheet, Worksheet rgSheet, Drawing drawingFile)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadWorksheet(IWorkbook rgWorkbook, Document doc, WorkbookSheet sheetIndex)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.ReadStream(IWorkbook rgWorkbook, Stream stream)
en unvell.ReoGrid.IO.ExcelFileFormatProvider.Load(IWorkbook workbook, Stream stream, Encoding encoding, Object arg)
en unvell.ReoGrid.Workbook.Load(Stream stream, FileFormat fileFormat, Encoding encoding)
en unvell.ReoGrid.Workbook.Load(String path, FileFormat fileFormat, Encoding encoding)
en unvell.ReoGrid.ReoGridControl.Load(String path, FileFormat fileFormat)...
Please let me know if you need the file to test it, and how can i send it to you.
Thanks for your time
code
/**/
grid.Load(@"D:\\ExcelWithSimpleGraph.xlsx", unvell.ReoGrid.IO.FileFormat.Excel2007);
/**/
Stacktrace
StackTrace:
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadChart(Worksheet rgSheet, ChartSpace chartSpace)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadGraphic(Document doc, Worksheet rgSheet, Drawing drawingFile, GraphicFrame graphicFrame)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadDrawingObjects(Document doc, Worksheet sheet, Worksheet rgSheet, Drawing drawingFile)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.LoadWorksheet(IWorkbook rgWorkbook, Document doc, WorkbookSheet sheetIndex)
en unvell.ReoGrid.IO.OpenXML.ExcelReader.ReadStream(IWorkbook rgWorkbook, Stream stream)
en unvell.ReoGrid.IO.ExcelFileFormatProvider.Load(IWorkbook workbook, Stream stream, Encoding encoding, Object arg)
en unvell.ReoGrid.Workbook.Load(Stream stream, FileFormat fileFormat, Encoding encoding)
en unvell.ReoGrid.Workbook.Load(String path, FileFormat fileFormat, Encoding encoding)
en unvell.ReoGrid.ReoGridControl.Load(String path, FileFormat fileFormat)
....
If you need the file to test how can i send it to you?
code:
sheet.DisableSettings(WorksheetSettings.View_AllowCellTextOverflow);
unvell.ReoGrid v2.0.50727
thx
]]>I am reading a memory work book but I have some problems with the import data from cells with formulas. Instead of give me the correct result, the program give me other data.
I had the same error other times and I don't know why, always with the cells with formulas, never with cells with numbers.
The code is very simple and I think it is free of mistake so I suppose the problem is with the dll I am using: 0.9.3 version.
I would like to send you the complete example including the excel file with the formulas but I don't know where or maybe you have already discovered this problem and it is fixed in the new version.
Thank you,
P.D. This is the code of the module:
Imports unvell.ReoGrid
Public Class Form1
Dim WorkbookModel As IWorkbook = ReoGridControl.CreateMemoryWorkbook
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
'Creacción de un Workbook en la memoria para contener el modelo estructural
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim lsheet As Worksheet
Dim lrow, lcol As Integer
Dim ldata1(4) As Object
With OpenFileDialog1
.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
.Filter = "Ficheros de excel|*.xlsx;*.xlsm|" &
"Todos los ficheros (*.*)|*.*"
.DefaultExt = "xlsx"
.FileName = "Data01.xlsx"
.InitialDirectory = "C:\Users\Antonio\Documents\VBNET_PRUEBAS\ExcelReadMistake"
End With
If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
Try
WorkbookModel.Load(OpenFileDialog1.FileName, IO.FileFormat.Excel2007)
Catch
MsgBox("Impossible open file", 16)
End Try
End If
lsheet = WorkbookModel.Worksheets(0)
lrow = 2
lcol = 14
For i = 0 To 4
ldata1(i) = lsheet(lrow, lcol)
lrow += 1
Next i
Me.TextBox1.Text = ldata1(0)
Me.TextBox2.Text = ldata1(1)
Me.TextBox3.Text = ldata1(2)
Me.TextBox4.Text = ldata1(3)
Me.TextBox5.Text = ldata1(4)
End Sub
End Class
]]>