albCode, thank you for the reply, but I have allready found many sources for converting in ASP using web pages.. What I need has to be done using Windows application.
veljkoz
Posts
-
Export DataGridView to Excel (xls) format -
Export DataGridView to Excel (xls) formatYes, this is a windows application (there are many solutions on the net for asp / web, but I've found none for windows app). Can you help me?
-
Export DataGridView to Excel (xls) formatHi! I need to export data contained in the DataGridView control to Excel. The code provided here does the work, but not fully - when Excel opens the file, it recognises it like a "Tab delimited values" and import wizard appears. This is too complicated for (my) end users, so I need a way to write "real" xls file, without the need of end user action. Do you know how can I do this? The code is: '(tab is DataGridView control containing data) Dim fileText As System.Text.StringBuilder = New System.Text.StringBuilder() 'exporting column names For Each col As DataGridViewColumn In tab.Columns If col.Visible = True Then fileText.Append(col.Name) fileText.Append(vbTab) End If Next fileText.Append(vbCrLf) 'export cell values For Each row As DataGridViewRow In tab.Rows For Each theCell As DataGridViewCell In row.Cells If theCell.Visible = True Then fileText.Append(theCell.Value.ToString()) fileText.Append(vbTab) End If Next fileText.Append(vbCrLf) 'moving to the next row Next My.Computer.FileSystem.WriteAllText("Test.xls", fileText.ToString(), False) Any help would be appreciated! Thank you in advance! Veljko
-
Connect to DB through proxy?The application is running behind a proxy server which is needed for internet access. The database needed for the application is on a remote server. How can I make a connection to the database through this proxy? The browser (IE) that is set up for proxy has access to the internet that way. When I try the application from a computer that doesn't use proxy, it's working just fine. I've tried something like:
System.Net.GlobalProxySelection.Select = New System.Net.WebProxy("proxy.xxxxx.xx.xx.xx", 8080) Dim conn As SqlConnection = New SqlConnection("server=xxxx;uid=testdata;pwd=sa;database=testdb") conn.Open()
but, it doesn't work... Thank you in advance! Veljko -
How to set time AND date using datepicker?Great! Thanks a lot!
-
How to set time AND date using datepicker?I need a user to provide the date and time. I'm doing this by using two datepicker controls, one to set date and the other one to set time. But the irritating thing is that I can't combine the two results!? All Date and Time properties of a DateTime class are ReadOnly :wtf: (for whatever the reason), but it would be nice if I could just say: UserDate.Date=pickDate.Date UserDate.Hour=pickTime.Hour UserDate.Minute=pickTime.Minute Can anyone help me how to solve this problem? Thank you, Veljko