|
I have an records near about 2.5 lac but excel sheet(sheet1) can contain maximum of 65 thousand now how can I transfer the records to the excel sheet . my application gets hang.
|
|
|
|
|
Excel simply isn't going to handle this. Excel's limit cannot be changed. The only way you'll get more rows is to add more sheets. But, even if you do this, I doubt you'll get 2.5 million rows into Excel, no matter how many sheets you use.
It sounds like you're trying to treat Excel as a database, something which it's not designed to do.
|
|
|
|
|
I wonder if anyone can help me. I am using VB.Net 2003
I have a grid that I want to format values in that grid e.g. format to 2 DP or righjt align etc
I tried the following and it does not seem to work.
dr(1) = format(objDR("VGFLOR"), "#0.00")
When I display in the command window it looks fine but displayed it is still the same e.g. 12.3 but I want 12.30 to be displayed.
This is a sample of how I am setting up my grid. There is code missed out.
'setup the grid columns
dt.Columns.Add(New DataColumn("Name", GetType(String)))
dt.Columns.Add(New DataColumn("Department", GetType(String)))
dt.Columns.Add(New DataColumn("Salary", GetType(Double)))
Do Until objDR.Read = False
dr = dt.NewRow
dr(0) = objDR("NAME") 'Name
dr(1) = objDR("DEPT") 'Department
dr(2) = objDR("SALARY") 'Salary
|
|
|
|
|
You don't format the values in the DataTable. You format them when displayed in your DataGridView, or whatever else you're using to show the data. In the DGV, you'd supply formatting information in your column definitions.
Dim col As New DataGridViewTextBoxColumn
With col
.HeaderText = "Header..."
.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
.DefaultCellStyle.Format = "#0.00"
End col
Dgv1.Columns.Add(col)
|
|
|
|
|
I have a treeview and each node has an icon. At runtime, the icons are appearing with a blue border which makes result very ugly. I use the same imagelist for a listview on the same form and the icons are being rendered perfectly without the blue boarder. Is there something in the system settings or whatever settings that i need to change or be aware of to get rid of this problem? The Icon size is 16X16 (same for the original icon, imagelist setting and treeview icon size) and the color depth is 32bit (highest for my machine)
Thanks for assisting.
|
|
|
|
|
Do your icons have a alpha channel?? I can't seem to duplicate your problem at all and that alpha is about the only thing I haven't tried.
|
|
|
|
|
Hi Dave, thanks for your efforts. The icons are standard windows shell32 icons, i actually get them from the system files. a weird thing happened yesterday, I duplicated the troublesome part of the system outside the application and it works well (icons are rendered well) but the moment i took the form back into the project, it behaved as before. Here are the 2 outputs side by side, the left one is the correct one running independently, on the right one after i add it to my windows project, with nothing changed.
http://www.4shared.com/file/35005243/44721ad3/Distorted.html[^]
|
|
|
|
|
OK. The problem isn't what I was thinking of. I still didn't come up with that problem either.
Is the color depth on the bad machine 32-bit?? It almost looks like 32-bit icons being rendered in 16-bit color. I'd also try updating the video drivers on the bad machine too. Hmm...
|
|
|
|
|
The shots were taken on same machine, running at the same time, i simply dragged the 2 windows side by side. I load the imagelist from the windows shell which has icons of size 32,32. the treeview is set to show a 16,16 icon size. the color depth is 32bits. (code and settings in both shots is exactly the same, the only difference is that the one in the right is wat my application is outputting and i desire wat's on the left.)
|
|
|
|
|
OK. I kind-of see what you're getting at now. Ummm...A bunch of questions come to mind.
1st, how to duplicate this "outside of your project". You said that you brought the form back into the project at it started to fail again. What dod you do here? Did you create a seperate project that did the same thing and it worked as expected??
How did you get the icons from the Shell?? Are they sitting on your drive in seperate files or as resources in your app?? Did you use an ImageList setup exactly the same between the two projects??
|
|
|
|
|
|
hi all,
in my application im having code to convert the datagrid values to excel sheet but when it is saving it is taking .html extension instead if .xls, pls help me to sort out.
Response.Clear()
Response.Buffer = True
Response.AddHeader("content-position", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.ms-Excel"
Me.EnableViewState = False
Dim stringwrite As New System.IO.StringWriter
Dim htmlwrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringwrite)
Dim da_GetAllBooks As SqlDataAdapter = New SqlDataAdapter("GetAllBooks_Proc", Con)
da_GetAllBooks.SelectCommand.CommandType = CommandType.StoredProcedure
da_GetAllBooks.Fill(_dataSet, "AllBooks(0)")
Dim index As Integer = 0
For index = 0 To dg_AllBooks.Columns.Count - 1
dg_AllBooks.Columns(index).SortExpression = True
Next
dg_AllBooks.DataSource = (_dataSet.Tables("AllBooks"))
dg_AllBooks.DataBind()
dg_AllBooks.RenderControl(htmlwrite)
Response.Write(stringwrite.ToString())
Response.End()
help me
|
|
|
|
|
Your code is confusing. You seem to be trying to i) output an Excel file and ii) display a DataGrid at the same time. You can't do both - your page can't return binary content and HTML at the same time. To dynamically build an Excel spreadsheet, do a search on CodeProject or Google for the JET OLE Provider. You should find plenty of examples.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
HI all
I want help on following issues its a vb.net application
1) want to open excel application inside my form
2) want to create number of excel sheet which depends on a number specified in a text box.
3) want to name the sheets as for example sheetname1, sheetname2......
Pl help me out.opening the excel application is biggest problem i am facing with lots of exception
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
I want to search Google[^] first.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi,
I wonder if it is possible to display text in the row headers (not column headers), I have fixed size of 6 rows, is it possible to display some kind of a title for each row?
for example:
I have a grid 6x6.
Columns are: Object 1, Object 2, Object 3, Object 4, Object 5, Object 6
The text in the rows headers would be : Data 1, Data 2, Data 3...
Thanks!
|
|
|
|
|
Check into the HeaderCell property of the Rows collection of the DataGridView.
DGV1.Rows(0).HeaderCell.Value = "Test..."
|
|
|
|
|
I added a new table to my database and have to make some changes to my existing tables. When I added the new table to my database I am not able to get the dataset to recognize it. How do I do this?
Also, I tried to create a new connection to the database file in the data folder and it said that it can't access the file because another application is already using it.
Greg
|
|
|
|
|
AAGTHosting wrote: I added a new table to my database and have to make some changes to my existing tables. When I added the new table to my database I am not able to get the dataset to recognize it. How do I do this?
Have you changed the query that fetches the data to populate your DataSet?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I completely rebuilt the dataset and also the database explorer does not show the new table.
What query are you talkign about? Do you mean the query for the tableAdapters for each table?
|
|
|
|
|
Of course the changes you made to the database don't show up. What did you do when you originally created the DataSet?? You told the designer which tables and columns in those table to include in the dataset, didn't you?? Well, unless you change that SELECT query, any changes you made to the database, even changing the type of a column, will NOT be reflected in the DataSet, unless you go back and change the query the DataSet is using.
Click on the DataSources tab and right click the DataSet you want, then click on "Configure DataSet with Wizard..." to go through the same process you went through before to initially setup this DataSet.
|
|
|
|
|
I tried to reconfigure the data set with the wizard and when I look at all the tables that come up in the wizard the new table I added is not there. So, I tried to create a new data set and when I looked at the tables in the wizard when trying to create that data set using the wizard the new table I created still was not there. Also the table does not show up in the database explorer. Why does it not show up in the wizard or the database explorer?
|
|
|
|
|
AAGTHosting wrote: Also the table does not show up in the database explorer. Why does it not show up in the wizard or the database explorer?
The only reason this would happen is because the Explorer is showing you one copy of the database and you made changes to another copy somewhere else.
Perhaps this is an Access database?? Did you make changes to the copy found in the build folder (Release or Debug)??
|
|
|
|
|
I have a textbox control whose multiline property is set to true.
I have some text in that textbox control.
For the first time I printed those textbox content program through my program.
And secondly, when i copy that exact same content in the notepad, and printed it,it prints differently.I want to print those textbox content like the printing from the notepad.
Do I have to change any setting in the textbox property so that the textbox content will be printed
in the same way that the notepad prints?
I think notepad automatically formats the spacing but the textbox control doesnot.So the textbox content doesnot print in the format that i want.
I printing using the code:
..........
e.Graphics.DrawString(txtPrnt.text, New Font("Tahoma", 8, FontStyle.Regular), Brushes.Black, e.MarginBounds.X, e.MarginBounds.Y)
...........
|
|
|
|
|
I am not very clear as what differences you see, however there would definitely be some difference between the print taken from an application like notepad and from a control like textbox.
Any text editor has codes written behind it to format text before it is sent to the printer. Therefore if you need any specific type of formatting in text, you should –
1) Take text value of text box in a string object.
2) Perform whatever formatting you want on this string by writing your code.
3) Send this string object to the printer.
I hope this clarifies the scenario.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|