Click here to Skip to main content
16,012,316 members

Comments by Member 10534668 (Top 3 by date)

Member 10534668 21-May-14 9:01am View    
Once you fill the blank values with any values eg. 0, the problem will be solved.
Member 10534668 13-May-14 0:22am View    
The exception was reported in this line in nested FOR Loop:
_mFileStream.WriteLine(String.Format(" <ss:data ss:type="" string""="">{0}", DataGrid.Item(intCol, intRow).Value.ToString))

I tried to include a Try.. Catch loop to suppress this and passed a "0" for blank cells. The code runs but the final excel sheet is corrupted...Thanks for taking time for helping me out...
Member 10534668 11-May-14 7:37am View    
Dear Manoj, This code works well when the datagridview is fully filled. If datagridview contains some blank spaces the code give rise to error "Object Reference not set to an instance of an object ", the error seems to be originated due to absence of data in some of datagridview cells. The error reported from nested For loop. I tried using Try..catch loop to suppress error and fill that cell with 0 and - but final excel file is corrupted. Can you suggest how I can get over this problem. Thanks very much.