ReoGrid icon indicating copy to clipboard operation
ReoGrid copied to clipboard

Error save to excel file: Object reference not set to an instance of an object

Open wmardain opened this issue 6 years ago • 8 comments

Dear,

Could you please help me for this issue? i have windows form in VB.NET, and use reo grid control in it. I load the file using:

rgc.Load("E:\Amazon Drive\abc\indolis-template-report-v1.xlsx")

And when i try to save it,

rgc.Save("E:\Amazon Drive\abc\.xlsx") , IO.FileFormat.Excel2007)

There is an error said: Object reference not set to an instance of an object

I try to find a solution, but still can not find in it. Thanks in advance

Best Regards

wmardain avatar Feb 05 '19 12:02 wmardain

Can please someone show me a clue why i receive this error.. The document only guide me this to save the file.. but i get an error

Rgds

wmardain avatar Feb 08 '19 09:02 wmardain

Dear All, After checking all possibilty.. Dim wb As New ReoGridControl wb.Load("E:\testabc.xlsx") Dim sh As Worksheet = wb.Worksheets(0) wb.CurrentWorksheet = sh Dim cell = sh.Cells("A1") cell.Data = "YESS" wb.Save("E:\testabcee.xlsx")

This code is working fine.. but the same will return error if i open my other excel report template. It seems my first file has a problem which result error on reogrid during save process. Can someone please help what excel data file that can make reogrid return error??

Thanks and Regards

wmardain avatar Feb 08 '19 16:02 wmardain

Additional information: I open the file, copy (duplicate) the worksheet, and changing the value inside worksheet. Then i save with other name.. and it result error.. which does not show me where the error is. The same line code will working find if i use blank file (new file) and just small modifications to it.

Thanks and Regards

wmardain avatar Feb 08 '19 17:02 wmardain

@wmardain Can you upload or send the xlsx file to me (jing at reogrid.net)

jingwood avatar Feb 12 '19 07:02 jingwood

@jingwood Thanks for responding to my question. I already sent the files

Rgds

wmardain avatar Feb 12 '19 07:02 wmardain

@wmardain Thanks. But there is no any errors when open and save your xlsx file, I use the latest version. Can you post the details of error message? You can also download the source code of ReoGrid and run the Editor to open your excel file, that will tell your exactly where the problem happens.

jingwood avatar Feb 12 '19 12:02 jingwood

Hi in my side, i do copy some sheet and do several search and replace to string in cell.

then when i try to save, there is an error.

is there something i need to do before save it and after i create/duplicate some sheets.

rgds

On Tue, Feb 12, 2019, 7:05 PM Jing <[email protected] wrote:

@wmardain https://github.com/wmardain Thanks. But there is no any errors when open and save your xlsx file, I use the latest version. Can you post the details of error message? You can also download the source code of ReoGrid and run the Editor to open your excel file, that will tell your exactly where the problem happens.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/unvell/ReoGrid/issues/220#issuecomment-462734524, or mute the thread https://github.com/notifications/unsubscribe-auth/AqLvcIOpQlo6Tz9-f6rffpP-hn5yjoQYks5vMq4JgaJpZM4ajGu8 .

wmardain avatar Feb 12 '19 12:02 wmardain

@wmardain Can you post some code that reappear the exception? without the test code I can't confirm and fix the problem.

jingwood avatar Feb 19 '19 08:02 jingwood