private void InitGridWeb()
        {
            GridWeb1.WorkSheets.Clear();

            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\Cells\\Products.xlsx";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
            GridWeb1.ActiveCell = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex].Cells["A1"];

            // ExStart:SetAutoFilter
            // Enable GridWeb's auto-filter.
            GridWeb1.WebWorksheets[GridWeb1.ActiveSheetIndex].RowFilter.EnableAutoFilter = true;

            // Set the header row.
            GridWeb1.WebWorksheets[GridWeb1.ActiveSheetIndex].RowFilter.HeaderRow = 0;


            // Set the starting column.
            GridWeb1.WebWorksheets[0].RowFilter.StartColumn = 0;

            // Set the ending column.
            GridWeb1.WebWorksheets[0].RowFilter.EndColumn = 9;
            // ExEnd:SetAutoFilter
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false && this.GridWeb1.IsPostBack == false)
            {
                string filePath = Server.MapPath("~/01_SourceDirectory/sampleResizableGridWeb.xlsx");

                GridWeb1.ImportExcelFile(filePath);
            }
        }
Ejemplo n.º 3
0
        private void LoadData()
        {
            // Gets the web application's path.
            string path     = (this.Master as Site).GetDataDir();
            string fileName = path + "\\Miscellaneous\\ShowHeaderBar.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
        private void LoadData()
        {
            // Gets the web application's path.
            string path     = (this.Master as Aspose.Cells.GridWeb.Examples.CSharp.Site).GetDataDir();
            string fileName = path + "\\Miscellaneous\\Charts.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
Ejemplo n.º 5
0
        private void LoadData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\GridWebBasics\\Skins.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
Ejemplo n.º 6
0
    private void LoadData()
    {
        // Gets the web application's path.
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\Skins.xls";

        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);
    }
        private void LoadData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            // Clear the sheets
            GridWeb1.WorkSheets.Clear();

            // Load the file
            GridWeb1.ImportExcelFile(path + "\\Articles\\Data.xlsx");
        }
Ejemplo n.º 8
0
        private void ReLoadData()
        {
            // Create path to xls file
            string path = (this.Master as Site).GetDataDir();

            // Set filename
            string fileName = path + "\\Miscellaneous\\Logical.xls";

            // Imports from a excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
        private void InitData()
        {
            // Create path to xls file
            string path = (this.Master as Site).GetDataDir();

            // Set filename
            string fileName = path + "\\Miscellaneous\\EmployeeSales.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
        private void LoadData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\RowsAndColumns\\CopyData.xlsx";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
            GridWeb1.ActiveCell = GridWeb1.WorkSheets[0].Cells["A1"];
        }
    private void InitData()
    {
        //Create path to xls file
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\PivotTable.xls";


        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);
    }
        private void InitGridWeb()
        {
            GridWeb1.WorkSheets.Clear();

            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\Cells\\Products.xlsx";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
            GridWeb1.ActiveCell = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex].Cells["A1"];
        }
        private void InitData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\Articles\\Data.xlsx";

            // Clears datasheets first.
            GridWeb1.WorkSheets.Clear();

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
        private void LoadData()
        {
            // License li = new  License();
            // li.SetLicense(@"D:\grid_project\ZZZZZZ_release_version\Aspose.Total.20141214.lic");

            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\GridWebBasics\\SampleData.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
        }
    private void LoadData()
    {
        // Gets the web application's path.
        string path = Server.MapPath("~");

        // Upper level.
        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\ShowHeaderBar.xls";

        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);

        GridWorksheet sheet = GridWeb1.WorkSheets[0];
    }
Ejemplo n.º 16
0
        private void LoadData()
        {
            // License li = new  License();
            // li.SetLicense(@"D:\grid_project\ZZZZZZ_release_version\Aspose.Total.20141214.lic");

            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\RowsAndColumns\\SampleData.xlsx";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
            GridWeb1.ActiveCell = GridWeb1.WorkSheets[0].Cells["A1"];
        }
    private void InitData()
    {
        if (!(!IsPostBack && !GridWeb1.IsPostBack))
        {
            return;
        }
        //Create path to xls file
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\PivotTable.xls";


        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);



        GridWorksheet sourceSheet = GridWeb1.WorkSheets[0];

        Aspose.Cells.GridWeb.Data.GridCellArea sourceRange = new GridCellArea();
        sourceRange.StartRow    = 0;
        sourceRange.StartColumn = 0;
        sourceRange.EndRow      = 29;
        sourceRange.EndColumn   = 5;

        GridWorksheet  sheet      = GridWeb1.WorkSheets.Add("PivotTable Report");
        GridCells      cells      = GridWeb1.WorkSheets[0].Cells;
        int            id         = sheet.PivotTables.Add(sourceSheet, sourceRange, "A1", "PivotTable Report");
        GridPivotTable pivotTable = sheet.PivotTables[id];



        //Apply formatting
        GridWeb1.DefaultFontName = "Arial";
        GridWeb1.DefaultFontSize = new System.Web.UI.WebControls.FontUnit(10);

        pivotTable.AddFieldToArea(GridPivotFieldType.Row, 0);
        pivotTable.AddFieldToArea(GridPivotFieldType.Row, 2);
        pivotTable.AddFieldToArea(GridPivotFieldType.Column, 3);
        pivotTable.AddFieldToArea(GridPivotFieldType.Column, 4);
        pivotTable.AddFieldToArea(GridPivotFieldType.Data, 5);
        pivotTable.Fields(GridPivotFieldType.Data)[0].Function = GridPivotFieldFunction.Sum;

        //Paints PivotTable report
        pivotTable.CalculateData();

        GridWeb1.ActiveSheetIndex = sheet.Index;
    }
        private void InitData()
        {
            if (!(!IsPostBack && !GridWeb1.IsPostBack))
            {
                return;
            }

            // Create path to xls file
            string path = (this.Master as Site).GetDataDir();

            // Set filename
            string fileName = path + "\\Miscellaneous\\PivotTable.xls";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);

            // Extract cells from source sheet
            GridWorksheet sourceSheet = GridWeb1.WorkSheets[0];

            Aspose.Cells.GridWeb.Data.GridCellArea sourceRange = new GridCellArea();
            sourceRange.StartRow    = 0;
            sourceRange.StartColumn = 0;
            sourceRange.EndRow      = 29;
            sourceRange.EndColumn   = 5;

            // Add new sheet
            GridWorksheet sheet = GridWeb1.WorkSheets.Add("PivotTable Report");
            GridCells     cells = GridWeb1.WorkSheets[0].Cells;

            // Add Pivot Table
            int            id         = sheet.PivotTables.Add(sourceSheet, sourceRange, "A1", "PivotTable Report");
            GridPivotTable pivotTable = sheet.PivotTables[id];

            // Apply formatting
            GridWeb1.DefaultFontName = "Arial";
            GridWeb1.DefaultFontSize = new System.Web.UI.WebControls.FontUnit(10);

            pivotTable.AddFieldToArea(GridPivotFieldType.Row, 0);
            pivotTable.AddFieldToArea(GridPivotFieldType.Row, 2);
            pivotTable.AddFieldToArea(GridPivotFieldType.Column, 3);
            pivotTable.AddFieldToArea(GridPivotFieldType.Column, 4);
            pivotTable.AddFieldToArea(GridPivotFieldType.Data, 5);
            pivotTable.Fields(GridPivotFieldType.Data)[0].Function = GridPivotFieldFunction.Sum;

            // Paints PivotTable report
            pivotTable.CalculateData();

            GridWeb1.ActiveSheetIndex = sheet.Index;
        }
Ejemplo n.º 19
0
    private void LoadData()
    {
        // Gets the web application's path.
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\FreezePane.xls";

        // Imports from a Grid file.
        GridWeb1.ImportExcelFile(fileName);

        GridWorksheet sheet = GridWeb1.WorkSheets[0];

        sheet.FreezePanes(3, 3, 3, 3);
    }
Ejemplo n.º 20
0
    private void ReLoadData()
    {
        //Create path to xls file
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));

        //Assign xls file path to string variable
        string fileName = path + "\\File\\Logical.xls";



        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);
    }
Ejemplo n.º 21
0
    private void LoadData()
    {
        //   License li = new  License();
        //  li.SetLicense(@"D:\grid_project\ZZZZZZ_release_version\Aspose.Total.20141214.lic");

        // Gets the web application's path.
        string path = Server.MapPath("~");

        // Upper level.
        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\List.xls";

        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);
    }
Ejemplo n.º 22
0
    private void InitData()
    {
        //Create path to xls file
        string path = Server.MapPath("~");

        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\PivotTable.xls";



        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);



        GridWorksheet sourceSheet = GridWeb1.WorkSheets[0];

        Aspose.Cells.GridWeb.Data.GridCellArea sourceRange = new GridCellArea();
        sourceRange.StartRow    = 0;
        sourceRange.StartColumn = 0;
        sourceRange.EndRow      = 29;
        sourceRange.EndColumn   = 5;


        //Add sheet and get index
        GridWorksheet sheet = GridWeb1.WorkSheets.Add("PivotTable Report");
        GridCells     cells = GridWeb1.WorkSheets[0].Cells;
        int           id    = sheet.PivotTables.Add(sourceSheet, sourceRange, "A1", "PivotTable Report");

        //Apply formatting
        GridWeb1.WorkSheets.DefaultFontName = "Arial";
        GridWeb1.WorkSheets.DefaultFontSize = new System.Web.UI.WebControls.FontUnit(10);


        //Clears all list box
        lbxFields.Items.Clear();
        lbxRowFields.Items.Clear();
        lbxColumnFields.Items.Clear();
        lbxDataFields.Items.Clear();
        // GridPivotTable pivotTable=sheet.PivotTables[id];
        //Adds PivotFields to lbxFields box.
        // GridPivotFieldCollection fields = pivotTable.Fields(GridPivotFieldType.Column);

        for (int i = 0; i < 6; i++)
        {
            lbxFields.Items.Add(new ListItem(cells[0, i].StringValue, cells[0, i].StringValue));
        }
    }
Ejemplo n.º 23
0
        private void InitData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\Worksheets\\Hyperlink.xls";

            // Clears datasheets first.
            GridWeb1.WorkSheets.Clear();

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);

            AddTextHyperlinks();
            AddImageHyPerlinks();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // ExStart:ShowFormulaFeature
                // Gets the web application's path.
                string path = (this.Master as Site).GetDataDir();

                // Clear the sheets
                GridWeb1.WorkSheets.Clear();

                // Load the file
                GridWeb1.ImportExcelFile(path + "\\Articles\\source.xlsx");
                // ExEnd:ShowFormulaFeature
            }
        }
Ejemplo n.º 25
0
        private void InitData()
        {
            // Create path to xls file
            string path = (this.Master as Site).GetDataDir();

            // Set filename
            string fileName = path + "\\Miscellaneous\\PivotTable.xls";

            // Imports from a excel file.
            GridWeb1.ImportExcelFile(fileName);

            // Extract cells from source sheet
            GridWorksheet sourceSheet = GridWeb1.WorkSheets[0];

            Aspose.Cells.GridWeb.Data.GridCellArea sourceRange = new GridCellArea();
            sourceRange.StartRow    = 0;
            sourceRange.StartColumn = 0;
            sourceRange.EndRow      = 29;
            sourceRange.EndColumn   = 5;


            // Add sheet and get index
            GridWorksheet sheet = GridWeb1.WorkSheets.Add("PivotTable Report");
            GridCells     cells = GridWeb1.WorkSheets[0].Cells;

            // Add Pivot Table
            int id = sheet.PivotTables.Add(sourceSheet, sourceRange, "A1", "PivotTable Report");

            // Apply formatting
            GridWeb1.WorkSheets.DefaultFontName = "Arial";
            GridWeb1.WorkSheets.DefaultFontSize = new System.Web.UI.WebControls.FontUnit(10);


            //Clears all list box
            lbxFields.Items.Clear();
            lbxRowFields.Items.Clear();
            lbxColumnFields.Items.Clear();
            lbxDataFields.Items.Clear();

            //Adds PivotFields to lbxFields box.
            for (int i = 0; i < 6; i++)
            {
                lbxFields.Items.Add(new ListItem(cells[0, i].StringValue, cells[0, i].StringValue));
            }
        }
Ejemplo n.º 26
0
        private void LoadData()
        {
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\RowsAndColumns\\Products.xlsx";

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);
            GridWeb1.ActiveCell = GridWeb1.WorkSheets[0].Cells["A1"];

            // Access active worksheet
            var sheet = GridWeb1.WorkSheets[this.GridWeb1.ActiveSheetIndex];

            // Enable GridWeb's auto-filter.
            sheet.AddAutoFilter(0, 0, sheet.Cells.MaxDataColumn);
            sheet.RefreshFilter();
        }
        private void LoadData()
        {
            // Gets the web application's path.
            string path     = (this.Master as Site).GetDataDir();
            string fileName = path + "\\Miscellaneous\\EmployeeSales.xls";

            // Clears datasheets first.
            GridWeb1.WorkSheets.Clear();

            // Imports from an excel file.
            GridWeb1.ImportExcelFile(fileName);

            // Freeze sheet2
            GridWeb1.WorkSheets[1].FreezePanes(2, 0, 2, 0);

            // Set sheets selectedIndex to 0
            GridWeb1.WorkSheets.ActiveSheetIndex = 0;
        }
Ejemplo n.º 28
0
    private void LoadData()
    {
        // Gets the web application's path.
        string path = Server.MapPath("~");

        // Upper level.
        path = path.Substring(0, path.LastIndexOf("\\"));
        string fileName = path + "\\File\\EmployeeSales.xls";

        // Clears datasheets first.
        GridWeb1.WorkSheets.Clear();
        // Imports from a excel file.
        GridWeb1.ImportExcelFile(fileName);

        //Freeze sheet2
        GridWeb1.WorkSheets[1].FreezePanes(2, 0, 2, 0);

        //set sheets selectedIndex to 0
        GridWeb1.WorkSheets.ActiveSheetIndex = 0;
    }
Ejemplo n.º 29
0
        private void LoadData()
        {
            // License li = new  License();
            // li.SetLicense(@"D:\grid_project\ZZZZZZ_release_version\Aspose.Total.20141214.lic");

            // ExStart:LoadExcelFileFromStream
            // Gets the web application's path.
            string path = (this.Master as Site).GetDataDir();

            string fileName = path + "\\GridWebBasics\\SampleData.xls";

            // Opening an Excel file as a stream
            FileStream fs = File.OpenRead(fileName);

            // Loading the Excel file contents into the control from a stream
            GridWeb1.ImportExcelFile(fs);

            // Closing stream
            fs.Close();
            // ExEnd:LoadExcelFileFromStream
        }
Ejemplo n.º 30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Put user code to initialize the page here
        if (!IsPostBack && !GridWeb1.IsPostBack)
        {
            // Gets the web application's path.
            string path = Server.MapPath("~");

            // Upper level.
            path = path.Substring(0, path.LastIndexOf("\\"));
            string fileName = path + "\\File\\List.xls";

            // Clears datasheets first.
            GridWeb1.WorkSheets.Clear();
            // Imports from a excel file.
            GridWeb1.ImportExcelFile(fileName);

            // Sets the filter.
            //GridWeb1.WebWorksheets[0].RowFilter.StartColumn = 0;
            //GridWeb1.WebWorksheets[0].RowFilter.EndColumn = 5;
        }
    }