[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.ConvertBarcodeToPicture

ConvertBarcodeToPicture Method

ConvertBarcodeToPicture(ImageType)

Converts calculated barcode formulas to pictures.

The converted pictures are placed at the original barcode positions, and the original barcode formulas are cleared after the conversion.

Declaration
public void ConvertBarcodeToPicture(ImageType imageType = ImageType.SVG)
Public Sub ConvertBarcodeToPicture(Optional imageType As ImageType = ImageType.SVG)
Parameters
Type Name Description
ImageType imageType

The ImageType of the converted barcode pictures.

Implements
Examples
worksheet.Range["A1"].Value = "Policy:411";
worksheet.Range["B1"].Formula = "=BC_QRCODE(A1)";
workbook.ConvertBarcodeToPicture(ImageType.JPG);
int pictureCount = worksheet.Shapes.Count;
string fileName = "BarcodeReport.xlsx";
workbook.Save(fileName);
Exceptions
Type Condition
NotSupportedException

Thrown if imageType is EMF or WMF.