Skip to main content

All Questions

Tagged with
0 votes
2 answers
661 views

Writing into a new column in excel file from list of string

I'm getting all the result in one single column but i want them in a new column TextWriter tw = new StreamWriter(ms); for (int i = 0; i < myList.Count; i++) { for(int j = 0; j< myList[i]...
CoderGuy's user avatar
0 votes
0 answers
456 views

Streamwriter for output for excel

I'm trying to export some data into an Excel file using streamwriter. I'm trying to edit what I'm using for exporting data in .csv but editing it in such way. What I want to export, in the .xls file, ...
Nicola's user avatar
  • 21
0 votes
0 answers
175 views

excel found unreadable content, for the data stored through StreamWriter file = new StreamWriter(@"Pee.xlsx", true)

When I write program output to an excel file through StreamWriter file = new StreamWriter(@"Pee.xlsx", true) I get a blank spreadsheet and the following error message when I open the resulting file in ...
Peeyush Pandey's user avatar
-1 votes
3 answers
5k views

Disallow Excel to auto format columns while opening a .csv file

Im exporting some data to a .csv file. .csv file: Hotel Name;Street;Postal Code;City;Latitude;Longitude Hotel X;Street 1;00000;City X;15.000000;15.000000 But if i open it in Excel, Excel will ...
Hille's user avatar
  • 2,240
1 vote
3 answers
887 views

VB .Net when exporting to CSV issue when viewing in MS Excel

I have encountered something really weird. When exporting to CSV my top line shows the quotation marks yet the lines below down. I use UTF8 encoding and manually add the double quotation marks to the ...
Grant's user avatar
  • 33
1 vote
1 answer
715 views

Streamwriter adding in extra line breaks randomly when exporting from visual studio to csv c#

I have been trying for a while now to export a data table to csv in visual studio after datalogging. For some reason I get weird results when importing into excel whereas notepad is fine. It seems ...
charley's user avatar
  • 95
0 votes
2 answers
3k views

Is there a way I can check to see if the file is already open?

I want to check if C:\Data.xlsb is already open or not. I have got following code from here How to tell if a certain Excel file is open using VB.NET? Public Shared Function OpenUnlockedFile(ByVal ...
user avatar
1 vote
2 answers
2k views

Write different tab or files separated in .csv or Excel file when using StreamWriter in C#

I have a console application that outputs the result into a .csv file. The console application calls several web services and outputs several data. The output contain URLs which differentiate one site ...
A arancibia's user avatar
1 vote
2 answers
2k views

CSV Helper not writing to file

I've been stuck trying to get the CSV Helper to write to a file. When I run DownloadRegistrantsCsv it downloads the file with the proper name and everything else, but it never writes anything to it. ...
maxshuty's user avatar
  • 10.5k
0 votes
1 answer
159 views

Code returns XML and html of page as well

On a asp.net page I call the following function to output some data as XML to be downloaded as a spreadsheet. public static void ToExcelStream(DataSet dsInput, string filename, string ProductName) { ...
Martin Smellworse's user avatar
5 votes
2 answers
3k views

What is the right CSV encoding for c# to open with Excel?

I write a CSV with my C# CSVWriter based on a StreamWriter. In my data I have a lot of special characters like "Bávaro". So when I use UTF-8 or ASCII to encode my CSV I can't get the "á" but I can ...
PassionateDeveloper's user avatar
0 votes
1 answer
10k views

Creating multiple sheets of excel from c# using streamwriter

I'm using the streamwriter to create an excel file. but the problem is that I didn't find a way to create multiple sheets and specify their names from c#. Also I wanted to draw a chart on excel using ...
Youmna Habchy's user avatar
-1 votes
1 answer
743 views

C# print multiple columns in different cells in EXCEL

I am working on C# in Win 7. I need to print to a .txt file by Streamwriter. StreamWriter outputfile = new StreamWriter(MYPATH, true); outputfile.Write(String.Format(WIDTH_1 + ...
user2420472's user avatar
  • 1,177
0 votes
2 answers
10k views

StreamReader and StreamWriter with Excel

I need some guidance here. I am reading a excel file using a StreamReader , then get the file to a string using the StreamReader.ReadToEnd(); method. Then I write the string to a different location ...
rustylepord's user avatar
  • 5,751
9 votes
2 answers
11k views

Apache POI: SXSSFWorkbook.dispose() does not exist

I'm using apache's POI API to write XLSX files. Since I need to write big files, I'm using the Streaming API (SXSSF). To do this, I'm following this guide. Note that by the end of the example there's ...
Miguel Ribeiro's user avatar

15 30 50 per page