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

C#

 
SuggestionRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Ralf Meier27-Oct-17 0:39
mveRalf Meier27-Oct-17 0:39 
GeneralRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Ratsr27-Oct-17 0:48
Ratsr27-Oct-17 0:48 
AnswerRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Richard MacCutchan27-Oct-17 0:36
mveRichard MacCutchan27-Oct-17 0:36 
GeneralRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Jim_Snyder27-Oct-17 4:28
professionalJim_Snyder27-Oct-17 4:28 
GeneralRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Richard MacCutchan27-Oct-17 5:05
mveRichard MacCutchan27-Oct-17 5:05 
AnswerRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Richard Deeming27-Oct-17 1:15
mveRichard Deeming27-Oct-17 1:15 
GeneralRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Nathan Minier27-Oct-17 1:28
professionalNathan Minier27-Oct-17 1:28 
AnswerRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Jim_Snyder27-Oct-17 4:24
professionalJim_Snyder27-Oct-17 4:24 
The only problem with OpenXML is a somewhat steep learning curve for someone admittedly new to C#. I agree it is a great solution to the problem, though.

I have used Microsoft.VisualBasic.IO to import .csv files, and it has the ability to export to .csv as well. Importing was extremely quick. To use it you will have to do the following:
Add a reference in code to FileIO:
using Microsoft.VisualBasic.FileIO;

You will need to add a reference to the assembly. The steps are (Framework 4.5, VS Pro 2013):
Open the Project menu
Select Add Reference
Open Framework
Checkmark Microsoft.VisualBasic

You can then use a FileSystem class method called OpenTextFileWriter or WriteAllText to put text into a .csv.
AnswerRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Gerry Schmitz27-Oct-17 4:43
mveGerry Schmitz27-Oct-17 4:43 
GeneralRe: Exporting result to .csv format instead of .xlsx without using interop.excel Pin
Richard MacCutchan27-Oct-17 5:06
mveRichard MacCutchan27-Oct-17 5:06 
QuestionProgram crashes when form is refreshed Pin
Member 1274878324-Oct-17 11:55
Member 1274878324-Oct-17 11:55 
AnswerRe: Program crashes when form is refreshed Pin
Dave Kreskowiak24-Oct-17 12:08
mveDave Kreskowiak24-Oct-17 12:08 
GeneralRe: Program crashes when form is refreshed Pin
Member 1274878324-Oct-17 16:20
Member 1274878324-Oct-17 16:20 
AnswerRe: Program crashes when form is refreshed Pin
Eddy Vluggen24-Oct-17 13:33
professionalEddy Vluggen24-Oct-17 13:33 
GeneralRe: Program crashes when form is refreshed Pin
Member 1274878324-Oct-17 16:10
Member 1274878324-Oct-17 16:10 
QuestionRe: Program crashes when form is refreshed Pin
Eddy Vluggen25-Oct-17 5:09
professionalEddy Vluggen25-Oct-17 5:09 
AnswerRe: Program crashes when form is refreshed Pin
OriginalGriff24-Oct-17 20:20
mveOriginalGriff24-Oct-17 20:20 
PraiseRe: Program crashes when form is refreshed Pin
Member 1274878331-Oct-17 15:43
Member 1274878331-Oct-17 15:43 
GeneralRe: Program crashes when form is refreshed Pin
OriginalGriff31-Oct-17 20:58
mveOriginalGriff31-Oct-17 20:58 
GeneralRe: Program crashes when form is refreshed Pin
Member 127487831-Nov-17 10:38
Member 127487831-Nov-17 10:38 
QuestionIssue with WPF C# Treeview GetFiles Pin
Member 1348136124-Oct-17 8:08
Member 1348136124-Oct-17 8:08 
SuggestionRe: Issue with WPF C# Treeview GetFiles Pin
Richard Deeming24-Oct-17 9:49
mveRichard Deeming24-Oct-17 9:49 
GeneralRe: Issue with WPF C# Treeview GetFiles Pin
Member 1348136124-Oct-17 10:01
Member 1348136124-Oct-17 10:01 
GeneralRe: Issue with WPF C# Treeview GetFiles Pin
Richard Deeming25-Oct-17 1:50
mveRichard Deeming25-Oct-17 1:50 
GeneralRe: Issue with WPF C# Treeview GetFiles Pin
Member 1348136125-Oct-17 3:09
Member 1348136125-Oct-17 3:09 

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.