sapienza88 commented on code in PR #1008:
URL: https://github.com/apache/fesod/pull/1008#discussion_r3783423038
##########
website/docs/sheet/read/sheet.md:
##########
@@ -100,3 +100,32 @@ public void exceptionRead() {
> xlSheetVeryHidden)". Very hidden can be set through `VBA`, and in this case,
> the hidden sheet cannot be unhidden
> through
> the "Unhide" operation.
+
+## Reading Specific Columns
+
+### Overview
+
+By configuring `includeColumnIndexes`, you can specify which columns to read
from a sheet. Unselected columns are skipped during parsing, and the target
columns are remapped to contiguous zero-based indices.
+
+Note: This feature supports both modern `.xlsx` (OOXML) and legacy `.xls`
(BIFF8 / Excel 97–2003) file formats.
+
+### Code Example
+
+```java
+@Test
+public void readSpecificColumns() {
+// Works with both demo.xlsx and demo.xls
+String fileName = "path/to/demo.xls";
+
+ // Specify 0-based column indices to include (e.g., Column A, C, E)
+ List<Integer> includeColumnIndexes = Arrays.asList(0, 2, 4);
+
+ try (ExcelReader excelReader = FesodSheet.read(fileName).build()) {
+ ReadSheet readSheet = FesodSheet.readSheet(0)
+ .head(DemoData.class)
+ .includeColumnIndexes(includeColumnIndexes)
+ .registerReadListener(new DemoDataListener())
+ .build();
+ excelReader.read(readSheet);
+ }
+}
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]