<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.harlamenkov.ru/index.php?action=history&amp;feed=atom&amp;title=EN%2Fdocumentation%2Fbasic_guide%2Fcharts_in_spreadsheets</id>
	<title>EN/documentation/basic guide/charts in spreadsheets - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.harlamenkov.ru/index.php?action=history&amp;feed=atom&amp;title=EN%2Fdocumentation%2Fbasic_guide%2Fcharts_in_spreadsheets"/>
	<link rel="alternate" type="text/html" href="https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/charts_in_spreadsheets&amp;action=history"/>
	<updated>2026-11-11T14:01:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/charts_in_spreadsheets&amp;diff=16607&amp;oldid=prev</id>
		<title>Sancho at 15:59, 5 September 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/charts_in_spreadsheets&amp;diff=16607&amp;oldid=prev"/>
		<updated>2011-09-05T15:59:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:59, 5 September 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l48&quot; &gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first line defines the corresponding chart object. The second line replaces the current chart with a new one — in this example, a line chart.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The first line defines the corresponding chart object. The second line replaces the current chart with a new one — in this example, a line chart.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Documentation/&lt;/del&gt;VBAnote|In Microsoft Excel, a distinction is made between charts which have been inserted as a separate page in a Microsoft Excel document and charts which are embedded in a table page. Correspondingly, two different access methods are defined there for charts. This distinction is not made in {{OOo}} Basic, because charts in {{OOo}} Calc are always created as embedded objects of a table page. The charts are always accessed using the &amp;lt;tt&amp;gt;Charts&amp;lt;/tt&amp;gt; list of the associated &amp;lt;tt&amp;gt;Sheet&amp;lt;/tt&amp;gt; object.}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{VBAnote|In Microsoft Excel, a distinction is made between charts which have been inserted as a separate page in a Microsoft Excel document and charts which are embedded in a table page. Correspondingly, two different access methods are defined there for charts. This distinction is not made in {{OOo}} Basic, because charts in {{OOo}} Calc are always created as embedded objects of a table page. The charts are always accessed using the &amp;lt;tt&amp;gt;Charts&amp;lt;/tt&amp;gt; list of the associated &amp;lt;tt&amp;gt;Sheet&amp;lt;/tt&amp;gt; object.}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{PDL1}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{PDL1}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sancho</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/charts_in_spreadsheets&amp;diff=16606&amp;oldid=prev</id>
		<title>Sancho: Основной текст</title>
		<link rel="alternate" type="text/html" href="https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/charts_in_spreadsheets&amp;diff=16606&amp;oldid=prev"/>
		<updated>2011-09-05T15:58:30Z</updated>

		<summary type="html">&lt;p&gt;Основной текст&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;section begin=title /&amp;gt;&amp;lt;noinclude&amp;gt;{{DISPLAYTITLE:&amp;lt;/noinclude&amp;gt;Using Charts in Spreadsheets&amp;lt;noinclude&amp;gt;}}&amp;lt;/noinclude&amp;gt;&amp;lt;section end=title /&amp;gt;{{BreadCrumbL10n}}&lt;br /&gt;
&lt;br /&gt;
{{Documentation/BASICGuideTOC&lt;br /&gt;
|ShowPrevNext=block&lt;br /&gt;
|ShowPrevPage=block&lt;br /&gt;
|PrevPage=EN/documentation/basic_guide/charts&lt;br /&gt;
|NextPage=EN/documentation/basic_guide/structure_of_charts&lt;br /&gt;
|chart=block&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Charts within spreadsheets can display the data from an assigned cell range within the spreadsheet.&lt;br /&gt;
Any modifications made to the data within the spreadsheet will also be reflected in the assigned chart.&lt;br /&gt;
The following example shows how to create a chart assigned to some cell ranges within a spreadsheet document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
Dim Doc As Object&lt;br /&gt;
Dim Charts As Object&lt;br /&gt;
Dim Chart as Object&lt;br /&gt;
Dim Rect As New com.sun.star.awt.Rectangle&lt;br /&gt;
Dim RangeAddress(0) As New com.sun.star.table.CellRangeAddress&lt;br /&gt;
&lt;br /&gt;
Doc = ThisComponent&lt;br /&gt;
Charts = Doc.Sheets(0).Charts&lt;br /&gt;
&lt;br /&gt;
Rect.X = 8000&lt;br /&gt;
Rect.Y = 1000&lt;br /&gt;
Rect.Width = 10000&lt;br /&gt;
Rect.Height = 7000&lt;br /&gt;
RangeAddress(0).Sheet = 0&lt;br /&gt;
RangeAddress(0).StartColumn = 0 &lt;br /&gt;
RangeAddress(0).StartRow = 0&lt;br /&gt;
RangeAddress(0).EndColumn = 2&lt;br /&gt;
RangeAddress(0).EndRow = 12&lt;br /&gt;
&lt;br /&gt;
Charts.addNewByName(&amp;quot;MyChart&amp;quot;, Rect, RangeAddress(), True, True)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although the code used in the example may appear to be complex, the central processes are limited to three lines. The first central line creates the &amp;lt;tt&amp;gt;Doc&amp;lt;/tt&amp;gt; document variable, which references the current spreadsheet document (&amp;lt;tt&amp;gt;Doc&amp;lt;/tt&amp;gt; line = &amp;lt;tt&amp;gt;StarDesktop.CurrentComponent&amp;lt;/tt&amp;gt;). The code used in the example then creates a list containing all charts of the first spreadsheet (&amp;lt;tt&amp;gt;Charts&amp;lt;/tt&amp;gt; line = &amp;lt;tt&amp;gt;Doc.Sheets(0).Charts&amp;lt;/tt&amp;gt;). Finally, in the last line, a new chart is added to this list using the &amp;lt;tt&amp;gt;addNewByName&amp;lt;/tt&amp;gt; method. This new chart is then visible to the user. The variable &amp;lt;tt&amp;gt;RangeAddress&amp;lt;/tt&amp;gt; determines the assigned cell range whose data will be displayed within the chart. The variable &amp;lt;tt&amp;gt;Rect&amp;lt;/tt&amp;gt; determines the position and size of the chart within the first sheet in the spreadsheet document. &lt;br /&gt;
&lt;br /&gt;
The previous example creates a bar chart. If a different chart type is needed, then the bar chart must be explicitly replaced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
Chart = Charts.getByName(&amp;quot;MyChart&amp;quot;).embeddedObject&lt;br /&gt;
Chart.Diagram = Chart.createInstance(&amp;quot;com.sun.star.chart.LineDiagram&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first line defines the corresponding chart object. The second line replaces the current chart with a new one — in this example, a line chart.&lt;br /&gt;
&lt;br /&gt;
{{Documentation/VBAnote|In Microsoft Excel, a distinction is made between charts which have been inserted as a separate page in a Microsoft Excel document and charts which are embedded in a table page. Correspondingly, two different access methods are defined there for charts. This distinction is not made in {{OOo}} Basic, because charts in {{OOo}} Calc are always created as embedded objects of a table page. The charts are always accessed using the &amp;lt;tt&amp;gt;Charts&amp;lt;/tt&amp;gt; list of the associated &amp;lt;tt&amp;gt;Sheet&amp;lt;/tt&amp;gt; object.}}&lt;br /&gt;
&lt;br /&gt;
{{PDL1}}&lt;/div&gt;</summary>
		<author><name>Sancho</name></author>
		
	</entry>
</feed>