![]() Graph is written into Data sheet.Ĭharts = Doc.Sheets(2).Charts '<- Nope, no dif. 'Ĝharts = Doc.Sheets("Graphs").Charts '<- Nope, no dif. 'Ĝharts = Doc.Sheets(0).Charts '<- 0 is probably the culprit GraphSheet = Doc.createInstance(".Spreadsheet")ĭoc.Sheets.insertByName("Graphs", GraphSheet) 'Delete and re-add the Graphs sheet to clear it. The Apache Software Foundation received th. Apache OpenOffice latest version: Free open-source office suite. ĭim Rect As New .Rectangleĭim RangeAddress(0) As New .CellRangeAddress Apache OpenOffice, free and safe download. It shouldn't be, but my original code did use "indexed addressing" correctly. That works too! I don't know if removing the "junk" sheet was relevant or not. When I used the code you suggested:Ĭharts = ("Graphs").Charts I noticed my error when trying to get the sheet by name. When I removed that sheet and used indexed addressing to specify the sheet to place the chart in (see bold line below), it worked! The spreadsheet also had an extra sheet with some "junk" in it. ![]() referenced in ETSI SR 000 314 (or the updates on the ETSI Web server) which are. I want to add a third sheet and place some charts in it. rights and ETSI shall not be held liable in any event for any damages. ![]() ![]() This SpreadSheet has two sheets with data. This document is updated periodically on no particular schedule. So the question is: how can I specify which sheet a chart is placed in? The new sheet is displayed to the user, but the charts are still written into the first sheet. Sheets = Doc.Sheets 'get the container of all SheetsĬhartSheet = Sheets.getByName("Charts") 'get the sheet named ChartsĬontroller = (ChartSheet) I have tried making the new ChartSheet the 'active sheet': ' I also tried Doc.Sheets(2).Charts, since that's the index of the "Charts" sheet. Thinking that Doc.Sheets( 0) might be the problem (the zero selecting the first sheet), I tried:Ĭharts = Doc.Sheets("Charts").Charts ' Look for the Charts sheet by name it appears in the first sheet of the spreadsheet, not in the new sheet I just created. When I create a new Chart ("M圜hart") and add it to all the Charts in the spreadsheet:Ĭharts.addNewByName("M圜hart", Rect, RangeAddress(), True, True) I use an OOBasic Macro to create a new sheet named "Charts" (easily enough done), create some charts ("easily enough done"), and want to place/arrange them neatly in the new sheet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |