Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Login to my Database from C#? Pin
Pete O'Hanlon1-Dec-16 21:36
mvePete O'Hanlon1-Dec-16 21:36 
GeneralRe: How to Login to my Database from C#? Pin
Member 128803401-Dec-16 22:15
Member 128803401-Dec-16 22:15 
GeneralRe: How to Login to my Database from C#? Pin
Pete O'Hanlon1-Dec-16 22:28
mvePete O'Hanlon1-Dec-16 22:28 
SuggestionRe: How to Login to my Database from C#? Pin
Richard Deeming2-Dec-16 2:09
mveRichard Deeming2-Dec-16 2:09 
AnswerRe: How to Login to my Database from C#? Pin
Gerry Schmitz2-Dec-16 8:00
mveGerry Schmitz2-Dec-16 8:00 
Questionc#webservice insert into Unity3d Pin
Member 128822191-Dec-16 19:26
Member 128822191-Dec-16 19:26 
AnswerRe: c#webservice insert into Unity3d Pin
Richard MacCutchan1-Dec-16 21:40
mveRichard MacCutchan1-Dec-16 21:40 
QuestionWPF Importing Raw Data From Excel And Want to Retain The Exact Date Format Pin
Mark McArdle1-Dec-16 4:54
Mark McArdle1-Dec-16 4:54 
I'm creating an application in WPF that takes a raw Excel or csv data file from a customer and processes it into an order in the business system. I've done all the back-end coding and 95% of it is in T-SQL.

On the front-end, I want to import the file into a datagrid, so the user can see the raw data as it is exactly in the original file, before it goes off to be processed on SQL Server.

The customer Excel or csv files vary in format and structure, so they have varying columns with varying formats. That's handled by the back-end. I want to just display the raw data in WPF.

So, one customer has the date formatted as "7-Nov-16" which my import code is converting to "42675", but I want it to show as "7-Nov-16" in the WPF datagrid.

My code loops through the cells to get the value to build a data-table and the line that gets the cell value is:

C#
cellData = Convert.ToString(excelRange.Cells[rowCount, colCount].Value2);


Is there some clever way to get this to preserve the original format?
AnswerRe: WPF Importing Raw Data From Excel And Want to Retain The Exact Date Format Pin
Richard Deeming1-Dec-16 5:33
mveRichard Deeming1-Dec-16 5:33 
GeneralRe: WPF Importing Raw Data From Excel And Want to Retain The Exact Date Format Pin
Mark McArdle1-Dec-16 5:38
Mark McArdle1-Dec-16 5:38 
Questionc# WPF Binding a listbox to another listbox's selected item Pin
Member 1288059530-Nov-16 22:11
Member 1288059530-Nov-16 22:11 
AnswerRe: c# WPF Binding a listbox to another listbox's selected item Pin
Pete O'Hanlon30-Nov-16 23:23
mvePete O'Hanlon30-Nov-16 23:23 
GeneralRe: c# WPF Binding a listbox to another listbox's selected item Pin
Member 128805951-Dec-16 1:46
Member 128805951-Dec-16 1:46 
Questionauto delete file Pin
Member 1287946030-Nov-16 18:41
Member 1287946030-Nov-16 18:41 
AnswerRe: auto delete file Pin
OriginalGriff30-Nov-16 20:10
mveOriginalGriff30-Nov-16 20:10 
AnswerRe: auto delete file Pin
Afzaal Ahmad Zeeshan1-Dec-16 7:20
professionalAfzaal Ahmad Zeeshan1-Dec-16 7:20 
GeneralRe: auto delete file Pin
Eddy Vluggen1-Dec-16 8:27
professionalEddy Vluggen1-Dec-16 8:27 
AnswerRe: auto delete file Pin
Gerry Schmitz1-Dec-16 9:09
mveGerry Schmitz1-Dec-16 9:09 
QuestionCan change Excel file to Object in C# window application Pin
Rosy mm30-Nov-16 15:33
Rosy mm30-Nov-16 15:33 
AnswerRe: Can change Excel file to Object in C# window application Pin
OriginalGriff30-Nov-16 20:13
mveOriginalGriff30-Nov-16 20:13 
GeneralMessage Closed Pin
30-Nov-16 22:12
Rosy mm30-Nov-16 22:12 
GeneralRe: Can change Excel file to Object in C# window application Pin
OriginalGriff30-Nov-16 22:57
mveOriginalGriff30-Nov-16 22:57 
GeneralRe: Can change Excel file to Object in C# window application Pin
Rosy mm1-Dec-16 19:01
Rosy mm1-Dec-16 19:01 
GeneralRe: Can change Excel file to Object in C# window application Pin
Richard Deeming1-Dec-16 2:07
mveRichard Deeming1-Dec-16 2:07 
AnswerRe: Can change Excel file to Object in C# window application Pin
Gerry Schmitz1-Dec-16 9:20
mveGerry Schmitz1-Dec-16 9:20 

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.