Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before/After formula:

Worksheet.ImportData

When data is imported into a worksheet using ExcelApplication's Worksheet.ImportData, ExcelWriter does NOT insert new rows: values and formulas are overwritten by the new values. Formulas referencing the cells with the new data are not updated and formatting is not applied to the cells containing the new values.

For example, we take the same template, but remove the data markers:

Before

Image Added

When the data is imported, the SUM formula that was in cell B4 is overwritten with one of the new values. Also, the formatting in cells A4, B3, B4, and C3 is only there because it was present in the original template. Also, the background color in row 5 was removed when the data was imported.

After

Image Added

How does ExcelWriter create rows when inserting data?
What happens to things in my template, when I insert data?
Import Data (application) vs. Bind Data (template)