•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,529 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,754 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 8516 | Replies: 3
![]() |
| |
•
•
Join Date: Aug 2004
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
i have an excel spreadsheet and i need to select a couple of ranges of data from a table and then to create a graph with these ranges. In excel you can use the crtl key to select discontinuous ranges and i c#
you can say
Excel.get_Range range = thisSheet.get_range("A2":"A6","c2":"c6", Type.Missing)
(Excel.get_Range range = thisSheet.get_range("A2:A6","C2:C6"); creates a range from A2 to C6 which isn't what i want).
but once i put this into the graph it all goes wrong.
Any help would be welcome
if anyone is reading this who has the same problem i do have a "hacked" solution, create a links (= celladdress) to all the required cells in a hidden continuous range and simply use this range in the chart.
you can say
Excel.get_Range range = thisSheet.get_range("A2":"A6","c2":"c6", Type.Missing)
(Excel.get_Range range = thisSheet.get_range("A2:A6","C2:C6"); creates a range from A2 to C6 which isn't what i want).
but once i put this into the graph it all goes wrong.
Any help would be welcome
if anyone is reading this who has the same problem i do have a "hacked" solution, create a links (= celladdress) to all the required cells in a hidden continuous range and simply use this range in the chart.
•
•
Join Date: Aug 2004
Location: Baton Rouge, LA
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
Join Date: Aug 2004
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
His is a sample of my code,
range = thisSheet.get_Range("A9:A12"+ otherRange.get_Address(true,true, Excel.XlReferenceStyle.xlA1,true,Missing.Value),Type.Missing);
range.Value2 = 123; //test the created range
newSeries.Values = range;
the values in the cells change but the chart doesn't accept the range. I am using excel 2000 is this the problem?
range = thisSheet.get_Range("A9:A12"+ otherRange.get_Address(true,true, Excel.XlReferenceStyle.xlA1,true,Missing.Value),Type.Missing);
range.Value2 = 123; //test the created range
newSeries.Values = range;
the values in the cells change but the chart doesn't accept the range. I am using excel 2000 is this the problem?
![]() |
•
•
•
•
•
•
•
•
DaniWeb C# Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Excel to Web in Real Time? (ASP)
- How to write files to an Excel application (Visual Basic 4 / 5 / 6)
- grabbing source from excel file (was: please, somebody help me!!!) (Visual Basic 4 / 5 / 6)
- Macros in Excel (Visual Basic 4 / 5 / 6)
- Visual C++ and Excel (C++)
Other Threads in the C# Forum
- Previous Thread: Putting skins for my windows project
- Next Thread: Java to C# Conversion


Hybrid Mode