Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9730

Re: Dealing with empty spaces in field name in Header Column of Excel sheet

$
0
0

Hi Koti

 

In your adapter module, when you are processing the first line of the Excel file to get the column header names, you can remove the spaces from the string.

 

You can achieve this using the replaceAll method of the String class, supplying the proper regex. Example below:-

String columnName = <your logic>;
columnName = columnName.replaceAll("\\s+","");

 

More details in the link below.

Removing whitespace from strings in Java - Stack Overflow

 

Rgds

Eng Swee


Viewing all articles
Browse latest Browse all 9730


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>