473,769 Members | 5,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export .net reports to excel

3 New Member
I am devolping a web application which which .net reports to a excel work book .each report in one excel sheet.i am using the following code..........


Dim objDestinationE xcel As New Excel.Applicati on
Dim objDestinationW BS As Excel.Workbooks
objDestinationW BS = objDestinationE xcel.Workbooks
objDestinationW BS.Open(Templat eFileName)
Dim objDestinationW B As Excel.Workbook
objDestinationW B = objDestinationW BS.Item(1)
Dim objDestinationW SS As Excel.Sheets
objDestinationW SS = objDestinationW B.Worksheets
'Dim objNewSheet As Excel.Worksheet
Dim a As Excel.Range = 2
Dim objDestinationS heet As Excel.Worksheet
'Dim objDestinationS heet As Excel.Workbook
'objDestination Sheet = objDestinationW SS.Item(Positio n)


Dim objSourceExcel As New Excel.Applicati on
Dim objSourceWBS As Excel.Workbooks
objSourceWBS = objSourceExcel. Workbooks
Dim objSourceWB As Excel.Workbook
Dim objSourceWSS As Excel.Sheets
Dim objSourceSheet As Excel.Worksheet

Dim objDestinationS heetAFTER As Excel.Worksheet

' Iterating through the file name list and opening one by one.
Dim iCounter As Integer
For iCounter = 0 To SourceFileName. Length - 1
objSourceWBS.Op en(SourceFileNa me(iCounter))
objSourceWB = objSourceWBS.It em(1)
objSourceWSS = objSourceWB.Wor ksheets
objSourceSheet = CType(objSource WSS.Item(1), Excel.Worksheet )
'oSheet = CType(oSheets.I tem(iCount + 1), Excel.Worksheet )
objDestinationS heet = objDestinationW SS.Item(iCounte r + 1)
objDestinationS heetAFTER = objDestinationW SS.Item(iCounte r + 2)
objDestinationW SS.Add(objDesti nationSheet, objDestinationS heetAFTER, 1, objSourceSheet)

this code is creating work book with some excel sheets.The data is not copied to the sheets.is their any method to copy the data of .net report to a excel sheet?Please help me to solve this problem.IT is very urgent.Thanku in advance........ .........
Nov 30 '06 #1
0 1117

Sign in to post your reply or Sign up for a free account.

Similar topics

1
17418
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed a database for her which is intended to make things a lot easier; however, I don't have a lot of experience with Access and I find that designing the reports in Access is tedious. I want to be able to print the reports (which are simply based on...
0
1528
by: Makuhari1998 | last post by:
Is it possible to create a macro that will open 7 reports at once and automatically export the results of each report into Excel? Can the results be exported into the same Excel workbook, or will they be in 7 different workbooks? Can I create a button on the main form of my database to run this macro? Also, is it possible to write a macro that can open several *queries* at once and export them into Excel? If so, will the data labels of...
1
2100
by: JMCN | last post by:
hello does anyone know why is there a character limitation (255) in excel when i export from the reports object in excel access? if i created a macro using the transferspreadsheet action from the query with the field of + 255 characters, it will export all characters. why is there a character limitation in the reports when exporting to excel? thanks in advance - jung
5
2674
by: Tim Frawley | last post by:
I created a .NET Com Class object for use in ASP reports to export database results directly to Excel. I have it all working just find but I cannot get the Excel process to go away after the job is done. I am using the following .NET code in my Com Class object: <ComClass(DIF2XLS.ClassId, DIF2XLS.InterfaceId, DIF2XLS.EventsId)> _ Public Class DIF2XLS #Region "COM GUIDs"
3
2018
by: Marja Ribbers-de Vroed | last post by:
Hi, One of my clients has a strange problem with my webapplication which I think may be related to some firewall setting on his computer. On several screens in the application, it is possible to click on an icon to start an export of data to Excel. The click on the icon triggers a form submit (a post, not a get) to a blank page, thereby passing the SQL select statement to use for the Excel export. I've never had any problem reports...
1
2565
by: srinivas | last post by:
Hi , I am a dotnet developer.I am working on crystal reports.My requirement is like this I have an excel sheet with some values.I need to read the excel values from excel sheet and need to show the values in crystal reports using c#.what i can do for populating the excel values into crystal reports.
2
9888
by: =?Utf-8?B?Um9iZXJ0?= | last post by:
About the time we installed Windows Server 2003 SP2 on our Web servers, our exports to Excel stopped working from Crystal Reports .NET within all our ASP.NET applications. However, the exports to pdf and Word still work. Is anyone else having this problem and have you found a resolution? We are using ..NET Framework 1.1. The web apps were created in Visual Studio 2003.
2
3336
by: VitorCastro | last post by:
Hello... First, sorry for my bad english... i have generated many pivot tables in Access 2003. and i want the code to export all of them to one single excel sheet and specific cell. i have little knowledge about this export function. i have generated many reports in excel, and save the sheet for information that pivot tables in access. with information in the specifici sheet and specific cell, e generated automatically the reports.. ...
3
7555
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks like garbage. I have maximize and minimize buttons on the left side of the excel spreadsheet that I don't want. I want separate tabs on the bottom of the spreadsheet that show the two queries separately from one another. But I don't know how...
19
11232
by: cj2 | last post by:
#1 Is there a quick way to export a datatable to an excel file? Or delimited file? #2 Where is the appropriate Microsoft monitored group to ask about writing reports in SQL Reporting services or SQL Server Business Intelligence Development Studio or whatever it's called?
0
9583
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
10039
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
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
9860
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
7406
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
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
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
2814
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.