[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IWorkbook.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
void ConvertBarcodeToPicture(ImageType imageType = ImageType.SVG)
Sub ConvertBarcodeToPicture(Optional imageType As ImageType = ImageType.SVG)
Parameters
Type Name Description
ImageType imageType

The ImageType of the converted barcode pictures.

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.