codeice / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

Need to trim any leading/trailing whitespaces for the entire excel file or atleast in the individual sheet level #99

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
This is not an issue but just felt that it could be more helpful to manipulate 
data if we have an option to trim the leading/trailing whitespaces at one go 
instead of doing it for each and every cell individually.

var Users = from user in excelQueryFactory.Worksheet("Users")
                        select user;
            foreach (var user in Users)
            {
                User.FirstName = user["FirstName"].ToString().Trim();                   
                User.MiddleName = user["MiddleName"].ToString().Trim();
                User.LastName = user["Lastname"].ToString().Trim();
                User.EmailId = user[EmailId].ToString().Trim();
        }
This is painful to convert it to string and then trimming for each and every 
cell value. 

What is the expected output? What do you see instead?

The expected output is some sort of method to trim the entire data in the excel 
or sheet

What version of the product are you using? On what operating system?

LinqToExcel_x64
Windows7 Professional

Please provide any additional information below.

NA

Original issue reported on code.google.com by sathya28...@gmail.com on 29 Nov 2013 at 7:02