Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3393328
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:02:15+00:00 2026-05-18T04:02:15+00:00

According to MSDN , Excel permits setting the Values property of a chart series

  • 0

According to MSDN, Excel permits setting the Values property of a chart series programmatically from an array:

Charts(“Chart1”).SeriesCollection(1).Values = _
Array(1, 3, 5, 7, 11, 13, 17, 19)

How do I do this with a SpreadsheetGear chart? In my particular problem, referring to a cell range is not feasible. I have tried to set the Values to a list of doubles and to a string of the format “1, 3, 5, …, 19”. Neither of those ways works, and SpreadsheetGear’s documentation gives no examples of the expected format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:02:16+00:00Added an answer on May 18, 2026 at 4:02 am

    You can use a formula consisting of an array of constant values for a chart series. You’ll need to format the string passed into ISeries.Values as follows: “={1,2,3,4}”. Here is a more complete example that replaces the first series in a chart, assuming you have a chart name “Chart 1” on worksheet “Sheet1” in the opened workbook:

    IWorkbook workbook = Factory.GetWorkbook(@"C:\chart.xlsx");
    SpreadsheetGear.Charts.IChart chart = workbook.Worksheets["Sheet1"].Shapes["Chart 1"].Chart;
    ISeries series1 = chart.SeriesCollection[0];
    series1.Values = "={10,20,30,40,50,60}";
    workbook.Save();
    

    A couple additional notes. For the best compatibility with Excel, you will need to use the Open XML (XLSX/XLSM) file format. Excel has no problem reading in the file above after it has been saved in XLSX/XLSM. However, Excel will convert this series formula to a static “data cache” and drop the series formula above. SpreadsheetGear has limited support for this “data cache” (we read it in but don’t write it out to the file format), so depending on how much interacting and saving you’ll be doing between SpreadsheetGear and Excel after you set the series formula above, you may run into these limitations upon opening this workbook in SpreadsheetGear after several passes between SpreadsheetGear and Excel. If you are simply using this workbook for reporting purposes, you should not run into any problems whatsoever.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to [MSDN: Array usage guidelines]( http://msdn.microsoft.com/en-us/library/k2604h5s(VS.71).aspx) : Array Valued Properties You should use
According to msdn, http://msdn.microsoft.com/en-us/library/bb774798%28VS.85%29.aspx , returning TRUE prevents user from editing labels. So I
According to MSDN , the range for REAL values is - 3.40E + 38
According MSDN, FxCop is an application that analyzes managed code assemblies (code that targets
According to MSDN , a hash function must have the following properties: If two
According to MSDN BOL (Books Online) description on SOME | ANY (Transact-SQL) , SOME
According to MSDN (Section 11.3.6 of the C# spec ): Within an instance constructor
According to MSDN Documentation for partial classes : Partial methods are implicitly private So
According to MSDN ( http://msdn.microsoft.com/en-us/library/system.windows.forms.label.autosize.aspx ), there's a note about Label 's AutoSize property:
According to Msdn : Memory-mapped files enable programmers to work with extremely large files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.