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

C#

 
GeneralRe: ESENTUTL in C# Pin
Richard Deeming2-Mar-20 7:08
mveRichard Deeming2-Mar-20 7:08 
AnswerRe: ESENTUTL in C# Pin
Mc_Topaz3-Mar-20 21:48
Mc_Topaz3-Mar-20 21:48 
QuestionNeed to Change DatagridView POP background color from Vincenzo Rossi Pin
Member 1464144527-Feb-20 17:25
Member 1464144527-Feb-20 17:25 
AnswerRe: Need to Change DatagridView POP background color from Vincenzo Rossi Pin
Pete O'Hanlon27-Feb-20 20:30
mvePete O'Hanlon27-Feb-20 20:30 
AnswerRe: Need to Change DatagridView POP background color from Vincenzo Rossi Pin
OriginalGriff27-Feb-20 20:33
mveOriginalGriff27-Feb-20 20:33 
QuestionOutlookaddin Pin
Member 1475442324-Feb-20 19:26
Member 1475442324-Feb-20 19:26 
AnswerRe: Outlookaddin Pin
OriginalGriff24-Feb-20 20:28
mveOriginalGriff24-Feb-20 20:28 
GeneralRe: Outlookaddin Pin
Member 1475442324-Feb-20 22:01
Member 1475442324-Feb-20 22:01 
GeneralRe: Outlookaddin Pin
OriginalGriff24-Feb-20 22:16
mveOriginalGriff24-Feb-20 22:16 
GeneralRe: Outlookaddin Pin
Member 1475442324-Feb-20 22:20
Member 1475442324-Feb-20 22:20 
GeneralRe: Outlookaddin Pin
OriginalGriff24-Feb-20 22:42
mveOriginalGriff24-Feb-20 22:42 
QuestionHow do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
Member 1140330424-Feb-20 7:46
Member 1140330424-Feb-20 7:46 
AnswerRe: How do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
Richard Deeming24-Feb-20 8:49
mveRichard Deeming24-Feb-20 8:49 
NB: You've posted this in the C# forum. It should really be in the VB.NET forum, since you're using VB.NET code.

You're exporting to a "tab-separated variables" file. You will have very limited control over formatting for this type of file.

It would probably be better to export to a "real" Excel file instead. For example, using EPPlus[^]:
VB.NET
Using package As New ExcelPackage()
    Dim sheet As ExcelWorksheet = package.Workbook.Worksheets.Add("Sheet1")
    sheet.Cells("A1").LoadFromDataTable(dt, True, TableStyles.Medium9)
    
    Response.Clear()
    Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    package.SaveAs(Response.OutputStream)
End Using
EPPlus will give you a lot more control over the resulting file:
Getting Started · JanKallman/EPPlus Wiki · GitHub[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

AnswerRe: How do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
jsc4229-Feb-20 11:13
professionaljsc4229-Feb-20 11:13 
QuestionC# Pin
Member 1475231922-Feb-20 2:35
Member 1475231922-Feb-20 2:35 
AnswerRe: C# Pin
OriginalGriff22-Feb-20 4:21
mveOriginalGriff22-Feb-20 4:21 
QuestionC# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Ayub Kokabi20-Feb-20 23:25
Ayub Kokabi20-Feb-20 23:25 
AnswerRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Gerry Schmitz21-Feb-20 6:11
mveGerry Schmitz21-Feb-20 6:11 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Ayub Kokabi21-Feb-20 7:37
Ayub Kokabi21-Feb-20 7:37 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Gerry Schmitz21-Feb-20 8:07
mveGerry Schmitz21-Feb-20 8:07 
Questionquery to a xml database Pin
devilonline119-Feb-20 15:57
devilonline119-Feb-20 15:57 
AnswerRe: query to a xml database Pin
OriginalGriff19-Feb-20 20:04
mveOriginalGriff19-Feb-20 20:04 
GeneralRe: query to a xml database Pin
devilonline120-Feb-20 8:59
devilonline120-Feb-20 8:59 
GeneralRe: query to a xml database Pin
Richard Deeming21-Feb-20 0:55
mveRichard Deeming21-Feb-20 0:55 
AnswerRe: query to a xml database Pin
F-ES Sitecore19-Feb-20 23:08
professionalF-ES Sitecore19-Feb-20 23:08 

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.