I'm trying to redact some cell content but the button is always greyed out, how do I enable the button?
Download PrizmDoc Cells Sample: https://github.com/Accusoft/hello-prizmdoc-cells-with-nodejs
Open ./routes/index.js
Replace steps 1 and 2 as shown below
Before
// 1. Upload the workbook (XLSX file). This only needs to be done once. cellsServerResponse = await cellsServer.post('/api/v1/workbooks', { headers: { 'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', filename }, body: await(readFileFromDocumentsDirectory(filename)) }); const body = JSON.parse(cellsServerResponse.body); // 2. Create a session for an end user to view the workbook. cellsServerResponse = await cellsServer.post('/api/v1/sessions', { json: { workbookId: body.workbookId, user: { displayName: 'Test User', initials: 'TU' } } });
After
// 1. Upload the workbook (XLSX file). This only needs to be done once. cellsServerResponse = await cellsServer.post('/api/v1/workbooks?replaceFormulasWithValues=true', { headers: { 'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', filename }, body: await readFileFromDocumentsDirectory(filename) }); const body = JSON.parse(cellsServerResponse.body); // 2. Create a session for an end user to view the workbook. cellsServerResponse = await cellsServer.post('/api/v1/sessions', { json: { workbookId: body.workbookId, user: { displayName: 'Test User', initials: 'TU' }, redaction: { enabled: true, }, }, });
So what changed?
- For step 1: A `queryParam` was added to our POST API endpoint `replaceFormulasWithValues=true`.
- For step 2: The `redaction: enabled: true` property was add to the POST request.
These changes enable the redaction button within PD Cells.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article