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
'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(vbCrLf) 'moving to the next row
I have a text box which is always disabled.
Is it possible to change the fore color and the background?
I tried to default the color to bule,
but the color of the text box still in gray.
Any suggestion? Thank you
na...problem...is...that dll is opening a session with mainframe....then opening a login form(vb)...takes the User information(UN,PASS,etc) pass to the mainframe system...checks for authentication...if correct....then pulls some data and shown to user.....previously it as working fine....but they have upgrated one of their S/W...which makes that dll not working...
me...just going through the code....really good code...some new features are there....new syntax....etc..tum madat karsakti ho but ....without proper environment samjhna muskil hai....like....mainframe....JAVA script...etc..
I have written a windows service that needs to be controlled and queried remotely. The Windows Service has an accompanying Web Service that I have implemented adequate security on and wish to be able to run the web service as Local System.
I am not able to change the settings on IIS as it is against our company's security policy and therefore I need to set the access credentials to the Serviceprocess via the object in the web service.
I can't, as yet, seem to find an adequate technote that will cover this and will be looking some more.
Any help will be grateful.
Server environment is Win 2000 Server, running IIS5, .net Framework 1.1.4322.