Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 15th, 2007, 12:39 PM
Registered User
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.Net Moving Chart to Excel Sheet 2


I have a problem in moving the chart to Sheet2 Location in Excel. Its working well in Microsoft Office 2003 (Excel 2003). But not working in Excel 97. Here is my code part. The logic is

objExcelChart = CType(objExcelWB.Charts.Add(missing, missing, missing, missing), Excel.Chart)
The above line is creating the chart sheet in excel then the below code lines are moving this chart sheet to sheet1 if its in Daily Condition . When it tries to move the second chart to sheet2 there is a problem. Its still locating the chart2 to sheet1 not moving it to Sheet2.
is there any work around it to solve this issue.
If (strTimeSpan = "Daily") Then
objExcelChart.SeriesCollection(1).XValues() = "=Sheet1!R6C1:R" + strRowCount + "C1"
objExcelChart.Location(Excel.XlChartLocation.xlLoc ationAsObject, "Sheet1")
ElseIf (strTimeSpan = "Weekly") Then
objExcelChart.SeriesCollection(1).XValues() = "=Sheet2!R6C1:R" + strRowCount + "C1"
objExcelChart.Location(Excel.XlChartLocation.xlLoc ationAsObject, "Sheet2")
objExcelChart.SeriesCollection(1).XValues() = "=Sheet3!R6C1:R" + strRowCount + "C1"
objExcelChart.Location(Excel.XlChartLocation.xlLoc ationAsObject, "Sheet3")
End If

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel sheet accessing(edit/update) in asp.net hemant.dna ASP.NET 1.0 and 1.1 Basics 0 January 31st, 2007 07:37 AM
Importing Excel sheet into Access using ASP prasanta2expert ASP.NET 1.0 and 1.1 Basics 1 October 5th, 2006 02:36 PM
Opening and emailing Excel sheet through ASP.Net venterjo ASP.NET 1.0 and 1.1 Basics 0 October 10th, 2005 09:55 AM
Manipulating Excel Chart Axes from VB.NET Whitehall2000 VB.NET 2002/2003 Basics 0 September 25th, 2003 09:07 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.