How to Load Visible Sheets & Skip Invisible Sheet while Loading Workbook in Andr

This technical tip show how developers can add hyperlinks to link data inside an Excel file their Android applications using Aspose.Cell for Android. A hyperlink links two entities. Everybody is familiar with hyperlinks because they are used extensively on the Internet. Using Aspose.Cells, developers can create different kinds of hyperlinks in Excel files. This article discusses what types of hyperlinks are supported in Aspose.Cells and how to use them.
//your code here... // The following code demonstrates how to load visible sheets only. File sdDir = Environment.getExternalStorageDirectory(); String sdPath = sdDir.getCanonicalPath(); String filePath = sdPath + "/Sample.out.xlsx" // Create a sample workbook // and put some data in first cell of all 3 sheets Workbook createWorkbook = new Workbook(); createWorkbook.getWorksheets().get("Sheet1").getCells().get("A1").setValue("Aspose"); createWorkbook.getWorksheets().add("Sheet2").getCells().get("A1").setValue("Aspose"); createWorkbook.getWorksheets().add("Sheet3").getCells().get("A1").setValue("Aspose"); // Keep Sheet3 invisible createWorkbook.getWorksheets().get("Sheet3").setVisible(false); createWorkbook.save(samplePath); // Load the sample workbook LoadDataOption loadDataOption = new LoadDataOption(); loadDataOption.setOnlyVisibleWorksheet(true); LoadOptions loadOptions = new LoadOptions(); loadOptions.setLoadDataAndFormatting(true); loadOptions.setLoadDataOptions(loadDataOption); Workbook loadWorkbook = new Workbook(samplePath, loadOptions); System.out.println("Sheet1: A1: " + loadWorkbook.getWorksheets().get("Sheet1").getCells().get("A1").getValue()); System.out.println("Sheet2: A1: " + loadWorkbook.getWorksheets().get("Sheet2").getCells().get("A1").getValue()); System.out.println("Sheet3: A1: " + loadWorkbook.getWorksheets().get("Sheet3").getCells().get("A1").getValue()); System.out.println("Data is not loaded from invisible sheet");

Url: http://www.aspose.com/Android/excel-component.aspx

Language: Java | User: Sheraz Khan | Created: Feb 10, 2016 | Tags: Convert Excel Chart to Image render chart as an image Excel Chart to Image in Android converting charts in Excel files to image Android Excel API Load Visible Sheets in Android apps Skip Invisible Sheet while Loading Workbook Android Excel library add worksheet in the Excel file