function generatePresentationData() {
let sheet = SpreadsheetApp.getActiveSheet();
let marketData = getDataFromSheet_(sheet);
let slides = getSlides_();
writeDataToPlayerSlide_(slides, marketData);
}
function getDataFromSheet_(sheet) {
let dataRange = sheet.getDataRange();
let data = dataRange.getValues();
data.shift();
return data;
}
function getSlides_() {
let presentation = SlidesApp.openById(PRESENTATION_ID);
return presentation.getSlides();
}
function writeDataToPlayerSlide_(slides, marketData) {
let slidesPlayers = slides[2];
if (slidesPlayers) {
for (let index = 0; index < marketData.length; index++) {
const namePlaceholder = ‘{{name’ + index + ‘}}’;
const q1Placeholder = ‘{{q1_’ + index + ‘}}’;
Try to use the service account for authentication.
Google requires that all Google projects have unique names. This error message indicates that by creating a sheet project with a name that matches a currently existing Google project, you are trying to perform an action on a Google project that already exists for which sheet does not have permission, which is why you see messages like The caller does not have permission and PERMISSION_DENIED.
Is it possible to extract data from Google Slides using UiPath, identify the row index within a table on a specific slide, and then update the content in certain rows?
Suppose you have a presentation with three slides, and on one of those slides, there is a table with a header named “testing.” You want to access this table and modify the data within specific rows.
Until this feature will be present in UiPath Google Workspace package, you can check the Google Documentation for Slides and to build your own App Script/Python to manipulate the Slides.
Examples:
In conclusion:
Yes, it is possible to extract data from Google Slides using UiPath. However, this usually requires interfacing with Google Slides’ API to extract such data or using screen scraping methods to capture the on-screen data.
Despite this, UiPath does not provide direct activities to manipulate Google Slides data. Yet, it does provide activity to manipulate Google Sheet data. Your requirement of identifying the row index within a table on a specific slide and updating the content specifically can be a bit challenging.
One potential workaround could be to use a combination of Google’s own “Apps Script” to interface with Slides, extract the data you need, and then use UiPath’s HTTP Request activity to interact with your Apps Script.
To be precise, if you often need to deal with tables in presentations and update them, it could be better to maintain the data in Google Sheets, and then just insert linked tables into your slides. This way, when you update the data in Sheets, it would be updated automatically in your Slides. But handling such operations on Google Slides directly might not be feasible directly via UiPath.
Remember that using UiPath for screen capture or scraping methods may not be reliable in all scenarios since it will rely heavily on the format and presentability of the data on the Google Slides. It would be better if the data could be first processed in a spreadsheet or a database, and then presented on Google Slides.
Remember: Whatever approach you select, you will have to build and test it thoroughly to ensure it works consistently.