Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Sun Mar 17, 2024 4:54 pm

Hi!
i need create filter, which contains part of the text.
for example
i need all value in row, which contain,or start with "sr"
sr031239,sr5949345,sr123125 ....
but i can't do this.
help pls

SerPivas
 
Posts: 13
Joined: Wed Jan 03, 2024 4:51 pm

Mon Mar 18, 2024 8:46 am

Hello,

Thanks for your inquiry.
To help us further investigate your issue, please provide us with your excel file, you can upload it here as an attachment or send it to this email address: support@e-iceblue.com. Thank you in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 422
Joined: Mon Dec 27, 2021 2:23 am

Mon Mar 18, 2024 9:36 am

Unfortunately, i can't do that
cuz this file from my work
it's forbidden.

SerPivas
 
Posts: 13
Joined: Wed Jan 03, 2024 4:51 pm

Tue Mar 19, 2024 5:50 am

Hello,

Thanks for your reply.
Sorry, if you cannot provide the documents, it will be difficult for us to further investigate. You can remove key information from the document and send it to this email: support@e-iceblue.com. We will keep your documents confidential. Thank you for your understanding.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 422
Joined: Mon Dec 27, 2021 2:23 am

Tue Mar 19, 2024 7:57 am

My bad
I mean column, not row
Sorry
Some value in column
Start with "sr01-....."
I need filter shows all value
Which start with "sr"

I can't remove key information
If i do that
The document will be empty

SerPivas
 
Posts: 13
Joined: Wed Jan 03, 2024 4:51 pm

Tue Mar 19, 2024 9:08 am

Hello,

Thanks for your reply.
Sorry, regarding the issue you mentioned, we cannot further investigate without the source file.Could you please simulate a document based on your source file and provide it to us? Thanks for your understanding.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 422
Joined: Mon Dec 27, 2021 2:23 am

Tue Mar 19, 2024 9:21 am

Книга2.7z
(6.03 KiB) Downloaded 233 times

SerPivas
 
Posts: 13
Joined: Wed Jan 03, 2024 4:51 pm

Wed Mar 20, 2024 3:15 am

Hello,

Thanks for your file.
Please refer to the following code to filter cells starting with "sr", If you have any questions, please feel free to write to us at any time.
Code: Select all
Workbook workbook = new Workbook();;
workbook.loadFromFile("нига2.xlsx");
//Get the first sheet
Worksheet sheet = workbook.getWorksheets().get(0);
// Filter cells data which strat with "sr"
sheet.getAutoFilters().setRange(sheet.getCellRange("A1:A9"));
FilterColumn filterColumn = sheet.getAutoFilters().get(0);
sheet.getAutoFilters().customFilter(filterColumn, FilterOperatorType.Equal,"sr*");
sheet.getAutoFilters().filter();
workbook.saveToFile("filterCellsByString_result.xlsx", ExcelVersion.Version2013);

Sincerely,
William
E-iceblue support team
Last edited by William.Zhang on Wed Mar 20, 2024 10:00 am, edited 1 time in total.
User avatar

William.Zhang
 
Posts: 422
Joined: Mon Dec 27, 2021 2:23 am

Wed Mar 20, 2024 8:44 am

Thanks! :)

SerPivas
 
Posts: 13
Joined: Wed Jan 03, 2024 4:51 pm

Return to Spire.XLS