J
Jason Frank
We are trying to find a way to load data more efficiently into a MS Graph
chart object's DataSheet using the C# MSGraph API. The chart we are
populating lives in a PowerPoint slide. There are several ways that we have
found that are supported, but would like to know if there are any different
approaches as none of these feels like the right approach.
1) Load the data cell by cell - this approach works, but is incredibly
slow when the data sheet contains a large amount of data. E.g. 100 rows x 10
columns. Each call to set a Cell's data is an expensive call to the Graph
API.
2) Paste from the Clipboard - I would prefer NOT to Copy a specific
format to the Clipboard and then Paste it into the Datasheet.
3) Also, there is the option of Importing a file (.txt, .csv,
..xls, .), where we would write the data to a file and then import this into
the Chart. I am leaning towards this option and am able to import an Excel
file, but am having difficulty importing a .txt file. When I try to import a
..txt file the application just hangs and does not return. I tried this in
VBA in PPT as well and have the same problem. I am, however, able to import
this text file through the PowerPoint UI itself and am presented with a
wizard to specify several options - delimiter or fixed width, delimiter,
column data format, etc.
So, I have two questions:
1.) Does anyone know what is causing the .txt FileImport to hang or how
to resolve this?
2.) Is anyone familiar with any way to use an array to set the Chart's
Datasheet 1 row at a time, or a double array to set the entire grid at once?
Excel allows this but am cannot find any way to do this in PPT / MS Graph.
Thanks,
Jason
chart object's DataSheet using the C# MSGraph API. The chart we are
populating lives in a PowerPoint slide. There are several ways that we have
found that are supported, but would like to know if there are any different
approaches as none of these feels like the right approach.
1) Load the data cell by cell - this approach works, but is incredibly
slow when the data sheet contains a large amount of data. E.g. 100 rows x 10
columns. Each call to set a Cell's data is an expensive call to the Graph
API.
2) Paste from the Clipboard - I would prefer NOT to Copy a specific
format to the Clipboard and then Paste it into the Datasheet.
3) Also, there is the option of Importing a file (.txt, .csv,
..xls, .), where we would write the data to a file and then import this into
the Chart. I am leaning towards this option and am able to import an Excel
file, but am having difficulty importing a .txt file. When I try to import a
..txt file the application just hangs and does not return. I tried this in
VBA in PPT as well and have the same problem. I am, however, able to import
this text file through the PowerPoint UI itself and am presented with a
wizard to specify several options - delimiter or fixed width, delimiter,
column data format, etc.
So, I have two questions:
1.) Does anyone know what is causing the .txt FileImport to hang or how
to resolve this?
2.) Is anyone familiar with any way to use an array to set the Chart's
Datasheet 1 row at a time, or a double array to set the entire grid at once?
Excel allows this but am cannot find any way to do this in PPT / MS Graph.
Thanks,
Jason