Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Fixing divide by zero exception into a whole new problem Pin
Member 1377871513-Apr-18 16:38
Member 1377871513-Apr-18 16:38 
GeneralRe: Fixing divide by zero exception into a whole new problem Pin
Luc Pattyn13-Apr-18 16:46
sitebuilderLuc Pattyn13-Apr-18 16:46 
GeneralRe: Fixing divide by zero exception into a whole new problem Pin
Member 1377871513-Apr-18 17:02
Member 1377871513-Apr-18 17:02 
SuggestionRe: Fixing divide by zero exception into a whole new problem Pin
Richard Deeming19-Apr-18 1:39
mveRichard Deeming19-Apr-18 1:39 
QuestionNull values from sql server database are displayed #VALUE! in Excel Pin
Gtari Abir13-Apr-18 6:09
Gtari Abir13-Apr-18 6:09 
AnswerRe: Null values from sql server database are displayed #VALUE! in Excel Pin
OriginalGriff13-Apr-18 6:31
mveOriginalGriff13-Apr-18 6:31 
AnswerRe: Null values from sql server database are displayed #VALUE! in Excel Pin
mecoder8915-Apr-18 22:01
mecoder8915-Apr-18 22:01 
AnswerRe: Null values from sql server database are displayed #VALUE! in Excel Pin
Gtari Abir16-Apr-18 0:27
Gtari Abir16-Apr-18 0:27 
Hello,
I found a way to resolve this, it is just about adding a test on the value i want to display, i added a test if it is null, i affect an empty string to it, below my code:
<pre>  for (int j = 0; j <= rows - 1; j++)
                    {
                        var rowItem = dt.Rows[j].ItemArray;
                        for (int k = 0; k <= rowItem.Length - 1; k++)
                        {
                            if (String.IsNullOrEmpty(rowItem[k].ToString()))
                                allRecords[j + 1, k] = string.Empty;
                            else
                            allRecords[j + 1, k] = rowItem[k];
                        }
                    }


Thanks ,
QuestionNeed help with Functions, ASAP! Pin
Member 1377783813-Apr-18 1:30
Member 1377783813-Apr-18 1:30 
AnswerRe: Need help with Functions, ASAP! Pin
Keviniano Gayo13-Apr-18 2:01
Keviniano Gayo13-Apr-18 2:01 
AnswerRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 4:14
mve#realJSOP13-Apr-18 4:14 
AnswerRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 6:23
mve#realJSOP13-Apr-18 6:23 
AnswerRe: Need help with Functions, ASAP! Pin
Eddy Vluggen13-Apr-18 6:45
professionalEddy Vluggen13-Apr-18 6:45 
AnswerRe: Need help with Functions, ASAP! Pin
Gerry Schmitz13-Apr-18 7:15
mveGerry Schmitz13-Apr-18 7:15 
AnswerRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 7:49
mve#realJSOP13-Apr-18 7:49 
AnswerRe: Need help with Functions, ASAP! Pin
BillWoodruff13-Apr-18 7:51
professionalBillWoodruff13-Apr-18 7:51 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 7:53
mve#realJSOP13-Apr-18 7:53 
GeneralRe: Need help with Functions, ASAP! Pin
BillWoodruff13-Apr-18 9:12
professionalBillWoodruff13-Apr-18 9:12 
GeneralRe: Need help with Functions, ASAP! Pin
Gerry Schmitz16-Apr-18 8:17
mveGerry Schmitz16-Apr-18 8:17 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 8:26
mve#realJSOP13-Apr-18 8:26 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 8:31
mve#realJSOP13-Apr-18 8:31 
GeneralRe: Need help with Functions, ASAP! Pin
BillWoodruff13-Apr-18 9:14
professionalBillWoodruff13-Apr-18 9:14 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 8:42
mve#realJSOP13-Apr-18 8:42 
GeneralRe: Need help with Functions, ASAP! Pin
Eddy Vluggen13-Apr-18 9:01
professionalEddy Vluggen13-Apr-18 9:01 
GeneralRe: Need help with Functions, ASAP! Pin
#realJSOP13-Apr-18 9:07
mve#realJSOP13-Apr-18 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.