473,698 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export Datagrid

Hi and TIA! I have a datagrid inside a panel control. I have a procedure
that exports the panel control and thus the datagrid to excel. The datagrid
has the following sample fields/data.

Nomen NIIN Qty
Key 000234567 2
Ring 002818181 3

The problem is that I loose the leading zero's. How can I update the
dataset to concatenate an apostrophe to the beginning of each NIIN value,
rebind the datagrid then export the panel as normal. Basically how do I
update the dataset? I don't want to concat the value in SQL view because I
have many views that use this export and I want the displayed value not to
show the apostrophe . Thanks for your help.

--

Reggie

Oct 17 '08 #1
1 1208
Never mind got it figured out. One thing though. I was thinking(hoping )
that the apostrophe wouldn't show in the excel sheet. It disappears when you
type it directly into a cell in excel. Any thoughts?

--

Reggie
"Reggie" <No************ *****@yahoo.com wrote in message
news:OP******** ******@TK2MSFTN GP03.phx.gbl...
Hi and TIA! I have a datagrid inside a panel control. I have a procedure
that exports the panel control and thus the datagrid to excel. The
datagrid has the following sample fields/data.

Nomen NIIN Qty
Key 000234567 2
Ring 002818181 3

The problem is that I loose the leading zero's. How can I update the
dataset to concatenate an apostrophe to the beginning of each NIIN value,
rebind the datagrid then export the panel as normal. Basically how do I
update the dataset? I don't want to concat the value in SQL view because
I have many views that use this export and I want the displayed value not
to show the apostrophe . Thanks for your help.

--

Reggie
Oct 17 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5888
by: Eric | last post by:
Dear All, I want to export datagrid content to a Excel file, the code just like below: Response.ContentType = "application/vnd.ms-excel" Response.Charset = "" Me.EnableViewState = False Dim tw As New System.IO.StringWriter() Dim hw As New System.Web.UI.HtmlTextWriter(tw) gridList.Columns(0).Visible = False
2
2469
by: Bidarkota | last post by:
Hi, I have a DataGrid in which there are some images and Data are displayed and in the webform.asp page i am using some stylesheets. when i export the datagrid all the images are also exported to datagrid and it is giving an alert that following stylesheets are missing when i export it. can anyone help me about this problem. I have seen the sites and articles regarding the datagrid export to excel. but still i am getting the same...
3
4351
by: Bidarkota | last post by:
When i export DataGrid to Excel all the HTML contents are also exporting to excel. i am using stylesheets in the ASPX Page and i am getting an alert message that stylesheets are missing. i need to export only the contents of the Datagrid to excel. i don't need all other stuff which is present on the page. is there any way to achieve it. Thanks in Advance
2
1463
by: footballhead | last post by:
I have a page with a datagrid that I have configured with all the information I need to provide to froogle for listing my products on their site. I am having trouble finding a way to successfully save the data in this datagrid as a text file. I am somewhat limited in that I do _NOT_ have access to code-behind. All code I use must be inline on the ASPX and the ASCX pages. I can create new pages if that would help. Does anyone know of a...
0
2925
by: kieran | last post by:
Hi, I have an 'export to excel' button on my Datagrid. All works well except that on my Datagrid, I have sub total rows. The subtotal rows use colspan so that the subtotals are given above certain columns When I export to excel, I do not have the colspan. As a result, the subtotals appear over the wrong columns in Excel.
6
3726
by: Sridhar | last post by:
Hi, I have to export data inside the datagrid into an excel worksheet. I have to do this on button click event. I am trying to do like this. First get the DataTable from the datagrid and iterate through each row to get the data. I am not able to get the DataTable from the datagrid. How could I do that? I tried like this but it is not working Dim dt as DataTable = CType(datagrid1.DataSource, DataTable)
0
1473
by: madhavit | last post by:
hi, i am able to export datagrid data to excel sheet but the problem is i am not able to export datagrid within datagrid data to excel. can anybody help me. thanx.
1
7753
by: Kondapanaidu | last post by:
Hi, I am using .NET 1.1, How to Export the data from Datagrid to PDF file. Lets assume that EMP Table EmpNo Empname 1 AAA
1
5660
by: johnlim20088 | last post by:
Hi All, I does have a question about export datagrid data to csv. Well, I know the common solution is 1) select the data again and put in the datatable, then export to csv. BUT I don't want this, I want DIRECTLY export what I saw in datagrid to CSV, because some of the value I changed in database before I display in the datagrid, does anyone can help me on this?
1
1801
by: Arch Stanton | last post by:
I export the contents of my datagrid controls to Excel using the following Sub: Sub WriteToExcel(Sender as Object, E as EventArgs) Response.Clear() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition","attachment;filename=Data.xls") Response.Charset = ""
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.