theprodigy83

Not copying more texts with more then 200 characters in Excel

5 posts in this topic

#1 ·  Posted

Hello,

I have a script that pulls the information from an .xlsx file and put it on a website page. Everything works well with exception of the descriptions part. When copying descriptions with more then 200 characters the bot just leave an empty field. When the description is short, it copies normally.

I'm using Windows 10 and Excel 2013. Any idea so I can fix this?

Share this post


Link to post
Share on other sites



#2 ·  Posted

Can only make an assumption here, I added your comment to a range of cells in Excel.

After _Excel_RangeRead, I added MsgBox(0, "", @error), this returned error 5 - Error occurred when reading data using the transpose method.

So just changed the last parameter $bForceFunc to True (see example below) and it was able to read the contents into the array.

$aWorkBook = _Excel_RangeRead($oWorkbook, Default, Default, 1, True)

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

This is what I have now

$descricao =_Excel_RangeRead($oWorkbook, $oWorkbook.Activesheet, "M" & String($i))

I already tried before (without success)

$descricao =_Excel_RangeRead($oWorkbook, $oWorkbook.Activesheet, "M", True & String($i))

Probably I'm doing something wrong here.

Share this post


Link to post
Share on other sites

#4 ·  Posted

It should be:

$descricao =_Excel_RangeRead($oWorkbook, $oWorkbook.Activesheet, "M" & $i, 1, True)

 

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  Posted

Great! It worked! A big thank you for your help @Subz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now