By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Spaces to be removed from string

P: 1
Hi,

I am building a dashboard with Excel but using .Net to automate some of the data which needs copying and pasting into the workbook. i have a column within Excel that have spaces within the string that i need removing. For example all numbers in Column B need removing leaving just the value.

How do i tell .net to do this

I tried using the below WB1Ws = Dim WB1WS As Excel.Worksheet

WB1WS.Range("g2").Formula = "=SUBSTITUTE(b2," ","")"

however it doesnt seem to like the formula
Jan 22 '16 #1
Share this Question
Share on Google+
1 Reply


100+
P: 299
You should use VB.net to read your cell data, modify the string, and then re-write the cell data instead of trying to write a formula.
Jan 22 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.