https://bz.apache.org/bugzilla/show_bug.cgi?id=69544

            Bug ID: 69544
           Summary: Unable to process XLSX charts exported from Google
                    Sheets
           Product: POI
           Version: 5.3.0-FINAL
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XDDF
          Assignee: dev@poi.apache.org
          Reporter: mat...@canva.com
  Target Milestone: ---

When Google Sheets exports charts to .xlsx files, the resulting XML chart only
contains formula references, and no cache:

```
<c:cat>
  <c:strRef>
    <c:f>Sheet1!$A$2:$A$8</c:f>
  </c:strRef>
</c:cat>
```

POI expects all Series objects to have a non-null `ptCount` object, which in
this scenario is not the case.

>From `XDDFChartData.java`:
```
public void replaceData(XDDFDataSource<?> category, XDDFNumericalDataSource<?
extends Number> values) {
  if (categoryData != null && values != null) {
    int numOfPoints = category.getPointCount();
    if (numOfPoints != values.getPointCount()) {
      LOGGER.warn("Category and values must have the same point count, but had
{}" +
      " categories and {} values.", numOfPoints, values.getPointCount());
    }
  }
  this.categoryData = category;
  this.valuesData = values;
}
```

The current implementation means POI can't interact with the datasource of any
Series exported from Google Sheets to Excel, even though the formula reference
is present.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to