ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radha Sangal" <>
Subject RE: find/replace
Date Tue, 07 Dec 2004 15:29:23 GMT
Thanks, I would try that ... I have to write a report after that saying
these java file names were found/not found in html file. 

-----Original Message-----
From: [] 
Sent: Tuesday, December 07, 2004 10:13 AM
Subject: AW: find/replace

> Is there any way in using Ant that we can extract/find/match "strings"
> in html/excel file with a list of strings (java file names). 

Excel is not a fine format to work with ... from the Java point of view.
See the notes on the Apache POI project.
It would be better to export the XLS to a simple text format like CSV.
you can work simply with regular expressions, iterating over lines and

> I have a big html file and a big excel file. I alwaz need to dig eyes
> into the excel column first to copy the java file name and then search
> it in the html file.

Sounds like these steps:
1. extract the java file names from excel
2. iterate over that list
3. search in html file(s)
4. Do ... what?

1. Extract the java file names from excel
a) XLS -> CSV
   Simply "Save As", or write a macro doing that.
b) extract the names from text file
   Would try <loadfile> with <filterchain>, maybe with <linecontains>
   And the <tokenfilter> with <replaceregex> should select only the

2. Iterate
   Use AntContribs <for>.

3. Search
   It depends on what you want to do. For "just" editing the
optional task
   could be useful.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message