public HSSFCreationHelper(HSSFWorkbook wb) { workbook = wb; // Create the things we only ever need one of dataFormat = new HSSFDataFormat(workbook.Workbook); }
//private static POILogger log = POILogFactory.GetLogger(typeof(HSSFSheet)); /// <summary> /// Creates new HSSFSheet - called by HSSFWorkbook to create a _sheet from /// scratch. You should not be calling this from application code (its protected anyhow). /// </summary> /// <param name="workbook">The HSSF Workbook object associated with the _sheet.</param> /// <see cref="LF.Utils.NPOI.HSSF.UserModel.HSSFWorkbook.CreateSheet()"/> public HSSFSheet(HSSFWorkbook workbook) { _sheet = InternalSheet.CreateSheet(); rows = new Dictionary<int, LF.Utils.NPOI.SS.UserModel.IRow>(); this._workbook = workbook; this.book = workbook.Workbook; }
private static ICellStyle GetHeadStyle(HSSFWorkbook workbook) { //表头样式 var headStyle = workbook.CreateCellStyle(); headStyle.Alignment = HorizontalAlignment.LEFT;//居中对齐 //表头单元格背景色 headStyle.FillForegroundColor = HSSFColor.LIGHT_GREEN.index; headStyle.FillPattern = FillPatternType.SOLID_FOREGROUND; //表头单元格边框 headStyle.BorderTop = BorderStyle.THIN; headStyle.TopBorderColor = HSSFColor.BLACK.index; headStyle.BorderRight = BorderStyle.THIN; headStyle.RightBorderColor = HSSFColor.BLACK.index; headStyle.BorderBottom = BorderStyle.THIN; headStyle.BottomBorderColor = HSSFColor.BLACK.index; headStyle.BorderLeft = BorderStyle.THIN; headStyle.LeftBorderColor = HSSFColor.BLACK.index; //表头字体设置 var font = workbook.CreateFont(); font.FontHeightInPoints = 12;//字号 font.Boldweight = 600;//加粗 //font.Color = HSSFColor.WHITE.index;//颜色 headStyle.SetFont(font); return headStyle; }
/** * Construct an escher graphics object. * * @param escherGroup The escher Group to Write the graphics calls into. * @param workbook The workbook we are using. * @param forecolor The foreground color to use as default. * @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). */ public EscherGraphics(HSSFShapeGroup escherGroup, HSSFWorkbook workbook, Color forecolor, float verticalPointsPerPixel) { this.escherGroup = escherGroup; this.workbook = workbook; this.verticalPointsPerPixel = verticalPointsPerPixel; this.verticalPixelsPerPoint = 1 / verticalPointsPerPixel; this.font = new Font("Arial", 10); this.foreground = forecolor; // background = backcolor; }
//[Obsolete] //public static void SetBorderLeft(LF.Utils.NPOI.SS.UserModel.CellBorderType border, Region region, HSSFSheet sheet, // HSSFWorkbook workbook) //{ // SetBorderLeft(border, toCRA(region), sheet, workbook); //} /// <summary> /// Sets the left border for a region of cells by manipulating the cell style /// of the individual cells on the left /// </summary> /// <param name="border">The new border</param> /// <param name="region">The region that should have the border</param> /// <param name="sheet">The sheet that the region is on.</param> /// <param name="workbook">The workbook that the region is on.</param> public static void SetBorderLeft(LF.Utils.NPOI.SS.UserModel.BorderStyle border, CellRangeAddress region, HSSFSheet sheet, HSSFWorkbook workbook) { int rowStart = region.FirstRow; int rowEnd = region.LastRow; int column = region.FirstColumn; CellPropertySetter cps = new CellPropertySetter(workbook, HSSFCellUtil.BORDER_LEFT, (int)border); for (int i = rowStart; i <= rowEnd; i++) { cps.SetProperty(HSSFCellUtil.GetRow(i, sheet), column); } }
public CellEvaluationFrame(HSSFWorkbook workbook, HSSFSheet sheet, int srcRowNum, int srcColNum) { if (workbook == null) { throw new ArgumentException("workbook must not be null"); } if (sheet == null) { throw new ArgumentException("sheet must not be null"); } _workbook = workbook; _sheet = sheet; _srcRowNum = srcRowNum; _srcColNum = srcColNum; }
public HSSFAutoFilter(string formula,HSSFWorkbook workbook) { //this.workbook = workbook; Ptg[] ptgs = HSSFFormulaParser.Parse(formula, workbook); if (!(ptgs[0] is Area3DPtg)) throw new ArgumentException("incorrect formula"); Area3DPtg ptg = (Area3DPtg)ptgs[0]; HSSFSheet sheet = (HSSFSheet)workbook.GetSheetAt(ptg.ExternSheetIndex); //look for the prior record int loc = sheet.Sheet.FindFirstRecordLocBySid(DefaultColWidthRecord.sid) ; CreateFilterModeRecord(sheet, loc+1); CreateAutoFilterInfoRecord(sheet, loc + 2,ptg); //look for "_FilterDatabase" NameRecord of the sheet NameRecord name = workbook.Workbook.GetSpecificBuiltinRecord(NameRecord.BUILTIN_FILTER_DB, ptg.ExternSheetIndex+1); if (name == null) name = workbook.Workbook.CreateBuiltInName(NameRecord.BUILTIN_FILTER_DB, ptg.ExternSheetIndex + 1); name.IsHiddenName = true; name.NameDefinition = ptgs; }
/** * Static method to convert an array of {@link Ptg}s in RPN order * to a human readable string format in infix mode. * @param book used for defined names and 3D references * @param ptgs must not be <c>null</c> * @return a human readable String */ public static String ToFormulaString(HSSFWorkbook book, Ptg[] ptgs) { return FormulaRenderer.ToFormulaString(HSSFEvaluationWorkbook.Create(book), ptgs); }
/** * @param formula the formula to parse * @param workbook the parent workbook * @param formulaType a constant from {@link FormulaType} * @param sheetIndex the 0-based index of the sheet this formula belongs to. * The sheet index is required to resolve sheet-level names. <code>-1</code> means that * the scope of the name will be ignored and the parser will match named ranges only by name * * @return the parsed formula tokens */ public static Ptg[] Parse(String formula, HSSFWorkbook workbook, FormulaType formulaType, int sheetIndex) { return FormulaParser.Parse(formula, CreateParsingWorkbook(workbook), formulaType, sheetIndex); }
/// <summary> /// Initializes a new instance of the <see cref="ExcelExtractor"/> class. /// </summary> /// <param name="wb">The wb.</param> public ExcelExtractor(HSSFWorkbook wb) : base(wb) { this.wb = wb; _formatter = new HSSFDataFormatter(); }
/// <summary> /// Creates new Cell - Should only be called by HSSFRow. This Creates a cell /// from scratch. /// </summary> /// <param name="book">Workbook record of the workbook containing this cell</param> /// <param name="sheet">Sheet record of the sheet containing this cell</param> /// <param name="row">the row of this cell</param> /// <param name="col">the column for this cell</param> /// <param name="type">CellType.NUMERIC, CellType.STRING, CellType.FORMULA, CellType.BLANK, /// CellType.BOOLEAN, CellType.ERROR</param> public HSSFCell(HSSFWorkbook book, HSSFSheet sheet, int row, short col, CellType type) { CheckBounds(col); cellType = CellType.Unknown; // Force 'SetCellType' to Create a first Record stringValue = null; this.book = book; this.sheet = sheet; short xfindex = sheet.Sheet.GetXFIndexForColAt(col); SetCellType(type, false, row, col, xfindex); }
public CellPropertySetter(HSSFWorkbook workbook, String propertyName, int value) { _workbook = workbook; _propertyName = propertyName; _propertyValue = (short)value; }
/// <summary> /// Creates an HSSFRow from a low level RowRecord object. Only HSSFSheet should do /// this. HSSFSheet uses this when an existing file is Read in. /// </summary> /// <param name="book">low-level Workbook object containing the sheet that Contains this row</param> /// <param name="sheet"> low-level Sheet object that Contains this Row</param> /// <param name="record">the low level api object this row should represent</param> ///<see cref="LF.Utils.NPOI.HSSF.UserModel.HSSFSheet.CreateRow(int)"/> public HSSFRow(HSSFWorkbook book, HSSFSheet sheet, RowRecord record) { this.book = book; this.sheet = sheet; row = record; RowNum=(record.RowNumber); // Don't trust colIx boundaries as read by other apps // set the RowRecord empty for the moment record.SetEmpty(); }
/// <summary> /// Creates new HSSFRow from scratch. Only HSSFSheet should do this. /// </summary> /// <param name="book">low-level Workbook object containing the sheet that Contains this row</param> /// <param name="sheet">low-level Sheet object that Contains this Row</param> /// <param name="rowNum">the row number of this row (0 based)</param> ///<see cref="LF.Utils.NPOI.HSSF.UserModel.HSSFSheet.CreateRow(int)"/> public HSSFRow(HSSFWorkbook book, HSSFSheet sheet, int rowNum):this(book, sheet, new RowRecord(rowNum)) { }
public static Stream ListToExcel(object list, Dictionary<string, string> titles, bool IsExportAllCol) { const int startIndex = 0; var fields = titles.Keys.ToList(); var workbook = new HSSFWorkbook(); var sheet = workbook.CreateSheet("sheet1"); sheet.DefaultRowHeight = 200 * 20; var row = sheet.CreateRow(startIndex); var headStyle = GetHeadStyle(workbook); EachHelper.EachListHeader(list, (i, name, type) => { if (!fields.Contains(name)) { if (IsExportAllCol) fields.Add(name); else return; } var cellIndex = fields.IndexOf(name) + startIndex; var cell = row.CreateCell(cellIndex); cell.SetCellValue(titles.ContainsKey(name)?titles[name]:name); cell.CellStyle = headStyle; sheet.AutoSizeColumn(cellIndex); }); EachHelper.EachListRow(list, (rowIndex, dataRow) => { row = sheet.CreateRow(rowIndex + 1); EachHelper.EachObjectProperty(dataRow, (i, name, value) => { if (!fields.Contains(name)) { if (IsExportAllCol) fields.Add(name); else return; } var cellIndex = fields.IndexOf(name) + startIndex; var dataStyle = GetDataStyle(workbook); var cell = row.CreateCell(cellIndex); cell.CellStyle = dataStyle; switch ((value??string.Empty).GetType().Name.ToLower()) { case "int32": case "int64": case "decimal": dataStyle.Alignment = HorizontalAlignment.RIGHT; cell.SetCellValue(ZConvert.To<double>(value,0)); break; default: cell.CellStyle.Alignment = HorizontalAlignment.LEFT; cell.SetCellValue(ZConvert.ToString(value)); break; } }); }); var ms = new MemoryStream(); workbook.Write(ms); ms.Flush(); ms.Position = 0; workbook = null; sheet = null; row = null; return ms; }
private static ICellStyle GetDataStyle(HSSFWorkbook workbook) { //数据样式 var dataStyle = workbook.CreateCellStyle(); dataStyle.Alignment = HorizontalAlignment.LEFT;//左对齐 //数据单元格的边框 dataStyle.BorderTop = BorderStyle.THIN; dataStyle.TopBorderColor = HSSFColor.BLACK.index; dataStyle.BorderRight = BorderStyle.THIN; dataStyle.RightBorderColor = HSSFColor.BLACK.index; dataStyle.BorderBottom = BorderStyle.THIN; dataStyle.BottomBorderColor = HSSFColor.BLACK.index; dataStyle.BorderLeft = BorderStyle.THIN; dataStyle.LeftBorderColor = HSSFColor.BLACK.index; //数据的字体 var datafont = workbook.CreateFont(); datafont.FontHeightInPoints = 11;//字号 dataStyle.SetFont(datafont); return dataStyle; }
/** * Constructs an escher graphics object. * * @param escherGroup The escher Group to Write the graphics calls into. * @param workbook The workbook we are using. * @param foreground The foreground color to use as default. * @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). * @param font The font to use. */ EscherGraphics(HSSFShapeGroup escherGroup, HSSFWorkbook workbook, Color foreground, Font font, float verticalPointsPerPixel) { this.escherGroup = escherGroup; this.workbook = workbook; this.foreground = foreground; // this.background = background; this.font = font; this.verticalPointsPerPixel = verticalPointsPerPixel; this.verticalPixelsPerPoint = 1 / verticalPointsPerPixel; }
//[Obsolete] //public static void SetRightBorderColor(short color, Region region, HSSFSheet sheet, // HSSFWorkbook workbook) //{ // SetRightBorderColor(color, toCRA(region), sheet, workbook); //} /// <summary> /// Sets the rightBorderColor attribute of the HSSFRegionUtil object /// </summary> /// <param name="color">The color of the border</param> /// <param name="region">The region that should have the border</param> /// <param name="sheet">The workbook that the region is on.</param> /// <param name="workbook">The sheet that the region is on.</param> public static void SetRightBorderColor(int color, CellRangeAddress region, HSSFSheet sheet, HSSFWorkbook workbook) { int rowStart = region.FirstRow; int rowEnd = region.LastRow; int column = region.LastColumn; CellPropertySetter cps = new CellPropertySetter(workbook, HSSFCellUtil.RIGHT_BORDER_COLOR, color); for (int i = rowStart; i <= rowEnd; i++) { cps.SetProperty(HSSFCellUtil.GetRow(i, sheet), column); } }
/// <summary> /// Sets the topBorderColor attribute of the HSSFRegionUtil object /// </summary> /// <param name="color">The color of the border</param> /// <param name="region">The region that should have the border</param> /// <param name="sheet">The sheet that the region is on.</param> /// <param name="workbook">The workbook that the region is on.</param> public static void SetTopBorderColor(int color, CellRangeAddress region, HSSFSheet sheet, HSSFWorkbook workbook) { int colStart = region.FirstColumn; int colEnd = region.LastColumn; int rowIndex = region.FirstRow; CellPropertySetter cps = new CellPropertySetter(workbook, HSSFCellUtil.TOP_BORDER_COLOR, color); LF.Utils.NPOI.SS.UserModel.IRow row = HSSFCellUtil.GetRow(rowIndex, sheet); for (int i = colStart; i <= colEnd; i++) { cps.SetProperty(row, i); } }
/* package */ internal HSSFName(HSSFWorkbook book, NameRecord name):this(book, name, null) { }
/// <summary> /// Creates an Cell from a CellValueRecordInterface. HSSFSheet uses this when /// reading in cells from an existing sheet. /// </summary> /// <param name="book">Workbook record of the workbook containing this cell</param> /// <param name="sheet">Sheet record of the sheet containing this cell</param> /// <param name="cval">the Cell Value Record we wish to represent</param> public HSSFCell(HSSFWorkbook book, HSSFSheet sheet, CellValueRecordInterface cval) { record = cval; cellType = DetermineType(cval); stringValue = null; this.book = book; this.sheet = sheet; switch (cellType) { case CellType.STRING: stringValue = new HSSFRichTextString(book.Workbook, (LabelSSTRecord)cval); break; case CellType.BLANK: break; case CellType.FORMULA: stringValue = new HSSFRichTextString(((FormulaRecordAggregate)cval).StringValue); break; } ExtendedFormatRecord xf = book.Workbook.GetExFormatAt(cval.XFIndex); CellStyle = new HSSFCellStyle((short)cval.XFIndex, xf, book); }
/** * Notifies this evaluation tracker that the evaluation of the specified * cell Is complete. <p/> * * Every successful call to <c>startEvaluate</c> must be followed by a * call to <c>endEvaluate</c> (recommended in a finally block) to enable * proper tracking of which cells are being evaluated at any point in time.<p/> * * Assuming a well behaved client, parameters to this method would not be * required. However, they have been included to assert correct behaviour, * and form more meaningful error messages. */ public void EndEvaluate(HSSFWorkbook workbook, HSSFSheet sheet, int srcRowNum, int srcColNum) { int nFrames = _evaluationFrames.Count; if (nFrames < 1) { throw new InvalidOperationException("Call to endEvaluate without matching call to startEvaluate"); } nFrames--; CellEvaluationFrame cefExpected = (CellEvaluationFrame)_evaluationFrames[nFrames]; CellEvaluationFrame cefActual = new CellEvaluationFrame(workbook, sheet, srcRowNum, srcColNum); if (!cefActual.Equals(cefExpected)) { throw new Exception("Wrong cell specified. " + "Corresponding startEvaluate() call was for cell {" + cefExpected.FormatAsString() + "} this endEvaluate() call Is for cell {" + cefActual.FormatAsString() + "}"); } // else - no problems so pop current frame _evaluationFrames.Remove(nFrames); }
/// <summary> /// Creates new HSSFName - called by HSSFWorkbook to Create a sheet from /// scratch. /// </summary> /// <param name="book">lowlevel Workbook object associated with the sheet.</param> /// <param name="name">the Name Record</param> /// <param name="comment"></param> internal HSSFName(HSSFWorkbook book, NameRecord name, NameCommentRecord comment) { this.book = book; this._definedNameRec = name; _commentRec = comment; }
/// <summary> /// Goes through the Wokrbook, optimising the cell styles /// by removing duplicate ones. /// For best results, optimise the fonts via a call to /// OptimiseFonts(HSSFWorkbook) first /// </summary> /// <param name="workbook">The workbook in which to optimise the cell styles</param> public static void OptimiseCellStyles(HSSFWorkbook workbook) { // Where each style has ended up, and if we need to // delete the record for it. Start off with no change short[] newPos = new short[workbook.Workbook.NumExFormats]; bool[] zapRecords = new bool[newPos.Length]; for (int i = 0; i < newPos.Length; i++) { newPos[i] = (short)i; zapRecords[i] = false; } // Get each style record, so we can do deletes // without Getting confused ExtendedFormatRecord[] xfrs = new ExtendedFormatRecord[newPos.Length]; for (int i = 0; i < newPos.Length; i++) { xfrs[i] = workbook.Workbook.GetExFormatAt(i); } // Loop over each style, seeing if it is the same // as an earlier one. If it is, point users of the // later duplicate copy to the earlier one, and // mark the later one as needing deleting // Only work on user added ones, which come after 20 for (int i = 21; i < newPos.Length; i++) { // Check this one for being a duplicate // of an earlier one int earlierDuplicate = -1; for (int j = 0; j < i && earlierDuplicate == -1; j++) { ExtendedFormatRecord xfCheck = workbook.Workbook.GetExFormatAt(j); if (xfCheck.Equals(xfrs[i])) { earlierDuplicate = j; } } // If we got a duplicate, mark it as such if (earlierDuplicate != -1) { newPos[i] = (short)earlierDuplicate; zapRecords[i] = true; } } // Update the new positions based on // deletes that have occurred between // the start and them // Only work on user added ones, which come after 20 for (int i = 21; i < newPos.Length; i++) { // Find the number deleted to that // point, and adjust short preDeletePos = newPos[i]; short newPosition = preDeletePos; for (int j = 0; j < preDeletePos; j++) { if (zapRecords[j]) newPosition--; } // Update the new position newPos[i] = newPosition; } // Zap the un-needed user style records for (int i = 21; i < newPos.Length; i++) { if (zapRecords[i]) { workbook.Workbook.RemoveExFormatRecord( xfrs[i] ); } } // Finally, update the cells to point at // their new extended format records for (int sheetNum = 0; sheetNum < workbook.NumberOfSheets; sheetNum++) { HSSFSheet s = (HSSFSheet)workbook.GetSheetAt(sheetNum); IEnumerator rIt = s.GetRowEnumerator(); while (rIt.MoveNext()) { HSSFRow row = (HSSFRow)rIt.Current; IEnumerator cIt = row.GetEnumerator(); while (cIt.MoveNext()) { ICell cell = (HSSFCell)cIt.Current; short oldXf = ((HSSFCell)cell).CellValueRecord.XFIndex; LF.Utils.NPOI.SS.UserModel.ICellStyle newStyle = workbook.GetCellStyleAt( newPos[oldXf] ); cell.CellStyle = (newStyle); } } } }
/// <summary> /// Creates new Cell - Should only be called by HSSFRow. This Creates a cell /// from scratch. /// When the cell is initially Created it is Set to CellType.BLANK. Cell types /// can be Changed/overwritten by calling SetCellValue with the appropriate /// type as a parameter although conversions from one type to another may be /// prohibited. /// </summary> /// <param name="book">Workbook record of the workbook containing this cell</param> /// <param name="sheet">Sheet record of the sheet containing this cell</param> /// <param name="row">the row of this cell</param> /// <param name="col">the column for this cell</param> public HSSFCell(HSSFWorkbook book, HSSFSheet sheet, int row, short col) : this(book, sheet, row, col, CellType.BLANK) { }
/// <summary> /// Goes through the Workbook, optimising the fonts by /// removing duplicate ones. /// For now, only works on fonts used in HSSFCellStyle /// and HSSFRichTextString. Any other font uses /// (eg charts, pictures) may well end up broken! /// This can be a slow operation, especially if you have /// lots of cells, cell styles or rich text strings /// </summary> /// <param name="workbook">The workbook in which to optimise the fonts</param> public static void OptimiseFonts(HSSFWorkbook workbook) { // Where each font has ended up, and if we need to // delete the record for it. Start off with no change short[] newPos = new short[workbook.Workbook.NumberOfFontRecords + 1]; bool[] zapRecords = new bool[newPos.Length]; for (int i = 0; i < newPos.Length; i++) { newPos[i] = (short)i; zapRecords[i] = false; } // Get each font record, so we can do deletes // without Getting confused FontRecord[] frecs = new FontRecord[newPos.Length]; for (int i = 0; i < newPos.Length; i++) { // There is no 4! if (i == 4) continue; frecs[i] = workbook.Workbook.GetFontRecordAt(i); } // Loop over each font, seeing if it is the same // as an earlier one. If it is, point users of the // later duplicate copy to the earlier one, and // mark the later one as needing deleting // Note - don't change built in fonts (those before 5) for (int i = 5; i < newPos.Length; i++) { // Check this one for being a duplicate // of an earlier one int earlierDuplicate = -1; for (int j = 0; j < i && earlierDuplicate == -1; j++) { if (j == 4) continue; FontRecord frCheck = workbook.Workbook.GetFontRecordAt(j); if (frCheck.SameProperties(frecs[i])) { earlierDuplicate = j; } } // If we got a duplicate, mark it as such if (earlierDuplicate != -1) { newPos[i] = (short)earlierDuplicate; zapRecords[i] = true; } } // Update the new positions based on // deletes that have occurred between // the start and them // Only need to worry about user fonts for (int i = 5; i < newPos.Length; i++) { // Find the number deleted to that // point, and adjust short preDeletePos = newPos[i]; short newPosition = preDeletePos; for (int j = 0; j < preDeletePos; j++) { if (zapRecords[j]) newPosition--; } // Update the new position newPos[i] = newPosition; } // Zap the un-needed user font records for (int i = 5; i < newPos.Length; i++) { if (zapRecords[i]) { workbook.Workbook.RemoveFontRecord( frecs[i] ); } } // Tell HSSFWorkbook that it needs to // re-start its HSSFFontCache workbook.ResetFontCache(); // Update the cell styles to point at the // new locations of the fonts for (int i = 0; i < workbook.Workbook.NumExFormats; i++) { ExtendedFormatRecord xfr = workbook.Workbook.GetExFormatAt(i); xfr.FontIndex = ( newPos[xfr.FontIndex] ); } // Update the rich text strings to point at // the new locations of the fonts // Remember that one underlying unicode string // may be shared by multiple RichTextStrings! ArrayList doneUnicodeStrings = new ArrayList(); for (int sheetNum = 0; sheetNum < workbook.NumberOfSheets; sheetNum++) { LF.Utils.NPOI.SS.UserModel.ISheet s = workbook.GetSheetAt(sheetNum); IEnumerator rIt = s.GetRowEnumerator(); while (rIt.MoveNext()) { HSSFRow row = (HSSFRow)rIt.Current; IEnumerator cIt = row.GetEnumerator(); while (cIt.MoveNext()) { ICell cell = (HSSFCell)cIt.Current; if (cell.CellType == LF.Utils.NPOI.SS.UserModel.CellType.STRING) { HSSFRichTextString rtr = (HSSFRichTextString)cell.RichStringCellValue; UnicodeString u = rtr.RawUnicodeString; // Have we done this string already? if (!doneUnicodeStrings.Contains(u)) { // Update for each new position for (short i = 5; i < newPos.Length; i++) { if (i != newPos[i]) { u.SwapFontUse(i, newPos[i]); } } // Mark as done doneUnicodeStrings.Add(u); } } } } } }
public HSSFConditionalFormattingRule(HSSFWorkbook pWorkbook, CFRuleRecord pRuleRecord) { workbook = pWorkbook; cfRuleRecord = pRuleRecord; }
private static IFormulaParsingWorkbook CreateParsingWorkbook(HSSFWorkbook book) { return HSSFEvaluationWorkbook.Create(book); }
private HSSFEvaluationWorkbook(HSSFWorkbook book) { _uBook = book; _iBook = book.Workbook; }
/** * Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int)} */ public static Ptg[] Parse(String formula, HSSFWorkbook workbook) { return FormulaParser.Parse(formula, CreateParsingWorkbook(workbook)); }