Thanks alot! It worked 100% .... but it looks a bit tacky. :~ I wanted it to look just like the format in Excel. So i went back to the drawing board for a new solution i want to share just incase someone else does it too. I copied the Excel sheet area i wanted to use and pasted it right in a new webform design view and saved it as Template.aspx . It looks exactly like the format in the excel sheet. Now the for cells i want to populate, i just name then with html tags. I then use a normal streamreader to read the Template.aspx file and use my session variables to change the tags to the values i want ...... and viola ! Thanks again for the table solution above, atleast it worked too. ;)
Gammaza
Posts
-
Populate Table from excel sheet ? -
Populate Table from excel sheet ?I can open an excel woorkbook and select the sheet that i want to work with. After i have populated the sheet with data from a web front end i wish to display all the new data in a table on a webpage. I know in what range the data is on the worksheet but im having trouble writing it to the table. Can anyone point me in a right direction please ?? some code ... Excel._Worksheet objSheet; Excel.Sheets objSheets; public void PopulateTable() { objSheets = (Microsoft.Office.Interop.Excel.Sheets)Session["ExcelSheets"]; objSheet = (_Worksheet)objSheets.get_Item(3); /// 3rd worksheet in the workbook Range PrintQuoteRange = objSheet.get_Range("A1", "E68"); //data from cell A1:E1 to A68:E68 //// display rows, col and cells in a table //// ????? }
-
ExcelIm busy with a asp.net application in C# where i work with an Excel file with 5 sheets in it. I populate the first two sheets and then formulas provide sheets 3 - 5 with data. How would i manage to print only sheets 3 to 5 after i have populated the first two ? Thanks in advance.
-
C# to ExcelGood morning, I would like to know if it is possible to use a streamwriter and write user input (string) to a specific cell in a worksheet in excel. If not a streamwriter, is there another class that might be able to do it ? Im not talking about writing comma delimeted files which you can open in excel, i want to write a string directly to an excel worksheet to a specific cell so that i can use the formulas created in it. Any help will be appreciated. Thank you.
-
Building a SqlConnection string during installationIm sorry but i can't find anything in custom actions that i want to get a connection string from the client during the installation.
-
Building a SqlConnection string during installationI dont know what the client's datasource address is so i want him to be able to enter it on setup of the website. How does one create a custom action in your install package to write a connection string? :~
-
richTextBoxTry it by selecting the keypressed property for the textbox then checking when backspace is pressed. You KeyPreview should also be true i think. e.KeyCode = BackSpace or Back or something like that.
-
Building a SqlConnection string during installationHi there, can anyone please help me? I wrote a program with a deployment project too. How can i add a sqlconnection setup during the deployment / installation of the program ? Thanks in advance.
-
C# Datagrid SearchSomething like that , just without the testboxes and filter only by one field. Thanks anyway ;)
-
C# Datagrid SearchYes im talking about a windows form. I did the textbox and button thing but i want as less buttons as possible. Im trying the keydown event ... but having some trouble with it. The datagrid wants to refresh and get the data from the dataset again but i just want it to scroll down to the letter, letters or word ...
-
C# Datagrid SearchHi everyone.... Can anyone tell me if its possible to autosearch a datagrid if the user starts typing on it ? For example if the user starts typing in a Code field, the datagrid must go to the first location equal to the character pressed etc. until a code is found. Keypressed property ?? Please need help ! :((
-
Date Time in c#I think the ToShortDateString does it automatically. DateTime date = Convert.ToDateTime(strdt).ToShortDateString();
-
Windows Form Datagrid ?How would i be able to read data out of the datagrid row by row ? I know how to do it in ASP but a Form's datagrid has different properties. Please help.
-
stopping a threadTry creating a click event or a button where you can abort the threads, not in their thread methods.
-
socketCheck out TCPListener, NetworkStream and StreamWriter classes.
-
how can I send datagridview cell value to another formHave you tried session variables ?? ex: on the datagrid page ..... Session["myValue"] = CellValue; and then on the main page ..... TextBox1.Text = Session["myValue"].ToString(); Hope this helps.
-
Dynamic SqlConnectionIm trying to create a website where users can run different databases on. I debuged the app using a static sql connection, but now im stuck. How would i make a dynamic sql connection where the user can choose from wich database to work from, before the app is executed ?