當前位置: 首頁>>代碼示例>>C#>>正文


C# HSSFSheet.InsertChartRecords方法代碼示例

本文整理匯總了C#中NPOI.HSSF.UserModel.HSSFSheet.InsertChartRecords方法的典型用法代碼示例。如果您正苦於以下問題:C# HSSFSheet.InsertChartRecords方法的具體用法?C# HSSFSheet.InsertChartRecords怎麽用?C# HSSFSheet.InsertChartRecords使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NPOI.HSSF.UserModel.HSSFSheet的用法示例。


在下文中一共展示了HSSFSheet.InsertChartRecords方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreateBarChart

        /**
         * Creates a bar chart.  API needs some work. :)
         *
         * NOTE:  Does not yet work...  checking it in just so others
         * can take a look.
         */
        public void CreateBarChart(HSSFWorkbook workbook, HSSFSheet sheet)
        {

            List<RecordBase> records = new List<RecordBase>();
            records.Add(CreateMSDrawingObjectRecord());
            records.Add(CreateOBJRecord());
            records.Add(CreateBOFRecord());
            records.Add(new HeaderRecord(string.Empty));
            records.Add(new FooterRecord(string.Empty));
            records.Add(CreateHCenterRecord());
            records.Add(CreateVCenterRecord());
            records.Add(CreatePrintSetupRecord());
            // unknown 33   
            records.Add(CreateFontBasisRecord1());
            records.Add(CreateFontBasisRecord2());
            records.Add(new ProtectRecord(false));
            records.Add(CreateUnitsRecord());
            records.Add(CreateChartRecord(0, 0, 30434904, 19031616));
            records.Add(CreateBeginRecord());
            records.Add(CreateSCLRecord((short)1, (short)1));
            records.Add(CreatePlotGrowthRecord(65536, 65536));
            records.Add(CreateFrameRecord1());
            records.Add(CreateBeginRecord());
            records.Add(CreateLineFormatRecord(true));
            records.Add(CreateAreaFormatRecord1());
            records.Add(CreateEndRecord());
            records.Add(CreateSeriesRecord());
            records.Add(CreateBeginRecord());
            records.Add(CreateTitleLinkedDataRecord());
            records.Add(CreateValuesLinkedDataRecord());
            records.Add(CreateCategoriesLinkedDataRecord());
            records.Add(CreateDataFormatRecord());
            //		records.Add(CreateBeginRecord());
            // unknown
            //		records.Add(CreateEndRecord());
            records.Add(new SerToCrtRecord());
            records.Add(CreateEndRecord());
            records.Add(CreateSheetPropsRecord());
            records.Add(CreateDefaultTextRecord((short)TextFormatInfo.FontScaleNotSet));
            records.Add(CreateAllTextRecord());
            records.Add(CreateBeginRecord());
            // unknown
            records.Add(CreateFontIndexRecord(5));
            records.Add(CreateDirectLinkRecord());
            records.Add(CreateEndRecord());
            records.Add(CreateDefaultTextRecord((short)3)); // eek, undocumented text type
            records.Add(CreateUnknownTextRecord());
            records.Add(CreateBeginRecord());
            records.Add(CreateFontIndexRecord((short)6));
            records.Add(CreateDirectLinkRecord());
            records.Add(CreateEndRecord());

            records.Add(CreateAxisUsedRecord((short)1));
            CreateAxisRecords(records);

            records.Add(CreateEndRecord());
            records.Add(CreateDimensionsRecord());
            records.Add(CreateSeriesIndexRecord(2));
            records.Add(CreateSeriesIndexRecord(1));
            records.Add(CreateSeriesIndexRecord(3));
            records.Add(EOFRecord.instance);



            sheet.InsertChartRecords(records);
            workbook.InsertChartRecord();
        }
開發者ID:89sos98,項目名稱:npoi,代碼行數:73,代碼來源:HSSFChart.cs


注:本文中的NPOI.HSSF.UserModel.HSSFSheet.InsertChartRecords方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。