How do I enable redaction within PrizmDoc Cells?

Modified on Wed, Sep 11, 2024 at 8:42 PM

I'm trying to redact some cell content but the button is always greyed out, how do I enable the button?


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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article