從另一個 Excel 文件更新圖表 (Update chart form another Excel file)


問題描述

從另一個 Excel 文件更新圖表 (Update chart form another Excel file)

我有 2 個 Excel 文件。首先是圖表(我將其命名為chart.xlsm),其次是圖表數據(data.xlsm)。第二個文件通過鏈接進行連接。

在第一個文件中,我有一個帶有日期編號的軸的圖表。當我打開文件時,它以 2016‑01 結尾。但是當我打開第二個文件(使用“開源”按鈕)時,圖表會更新並以 2016‑03 結束。

我查看了屬性,

在打開數據之前。 xlsm

Series values : =[0]!ATTs
Axis label range : =[0]!DatesValues

打開data.xlsm後

Series values : ='chart.xlsm'!ATTs
Axis label range : ='chart.xlsm'!DatesValues

“更新值”選項不會更新圖表。有沒有辦法在不打開 data.xlsm 的情況下更新此圖表?

編輯:在 chart.xlsm 中有另一個表格從 data.xlsm 中獲取數據。不同之處在於另一張紙採用單個單元格,而不是范圍。這些值正在更新,圖表沒有。


參考解法

方法 1:

I'm not sure how you are linking the chart to the data file, but I assume you are doing it via VBA, seeing that you are using xlsm.

The easiest way of getting what you want is to simply open chart.xlsx and data.xlsm, then create the chart and select the data you want to show from data. The downside of this solution is, that Excel will create a fixed link path to data.xlsm.

EDIT based on comment: Under "Data > edit links" you can edit the files Excel linked to. Sometimes in older versions these links used to break when the source file was open during creation (it wrote source.xls instead of \network_folder\source.xlsx, which would remove the ability to update data correctly if the source file was not open)

In that case edit the link manually and point it correctly to \\yourshare\yoursubfolder\sourcefile.xls

(by korekPhilippe)

參考文件

  1. Update chart form another Excel file (CC BY‑SA 2.5/3.0/4.0)

#excel-2007 #charts #excel






相關問題

Excel 2007 - 捕獲打開命令欄按鈕事件 (Excel 2007 - Catch open command bar button event)

將範圍變量傳遞給 Excel 宏中的公式 (Passing Range Variable into formula in Excel Macro)

Formula CONCATENATE (CONCATENATE formulas)

如何使用coldfusion創建xlsx文件 (how to create xlsx files using coldfusion)

Excel匹配兩列並輸出第三個 (Excel match two columns and output third)

Excel 無法將工作表插入到目標工作簿中,因為它包含的行數和 (Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and)

使用多個條件的條件格式 - Excel 2007 (Conditional Formatting using multiple conditions - Excel 2007)

從另一個 Excel 文件更新圖表 (Update chart form another Excel file)

VBA 名稱屬性是否區分大小寫 (Is VBA name property is case sensitive)

將 A1 公式和數組轉換為 L1C1 公式,反之亦然 (convert A1 formula and Array into L1C1 formula and vice-versa)

如何在excel中獲得所需的輸出? (How to get the required output in excel?)

查找包含數字的行中的第一個單元格? (Find first cell in a row that contains a number?)







留言討論