16,012,316 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.