CTRL+V from MS Excel into HTML page...

User 2572511 Photo


Registered User
5 posts

Hi

I use HTML Editor V12.9 Build 714. As it seems this version is no longer supported by Coffeecup I can not ask their support for help in this matter.

I am using a macro in Microsoft Excel 2007 to copy a range of data to the Clipboard which I am then pasting into a open HTML page within HTML Editor using either CTRL+V or right click paste (both work).

This works fine except for some reason the HTML Editor will not paste the first line of what ever I copy with the macro. I know the macro IS copying correctly because if I CTRL+V or right click into other programs like Notepad, Notpad++ or even MS Word the first line is pasted correctly.

I have posted into quite a few MS Excel help forums and several MS MVP's (Microsoft Accredited Experts) assure me that the macro is working correctly and the problem is being caused by CoffeeCup.

Does anyone have any suggestions please as I really need this to work?

Thanks in advance.:D
User 379556 Photo


Registered User
631 posts

I would be inclined to try the following. It might not help, but seems worth checking.

1. I would do a manual copy (Ctrl+c) from a selection of data from the spreadsheet, and manually paste it into HTML Editor. If that worked without the problem mentioned, I would be inclined to suspect that the macro was adding a character or characters at the start that didn't show up in MS Word or the default view in Notepad++.

2. I would paste the above manual copy from the spreadsheet into Notepad++, and then run the macro to copy that same selection, and paste the macro's copy also into Notepad++. In Notepad++ I would go to View > Show Symbol > Show All Characters and see what, if any, differences there were between the first line of those two paste jobs.

If the above revealed the problem, it would, of course, be a matter of adjusting the macro so that its copying matched manual copying.

Frank
User 187934 Photo


Senior Advisor
18,025 posts

Copy and paste into notepad first to strip hidden characters.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personnel site used for testing and as an easy way to share photos.(RLM imported to RSD)
http://ericrohloff.com
http://ericrohloff.com/property/
User 2088758 Photo


Senior Advisor
2,581 posts

Eric Rohloff wrote:
Copy and paste into notepad first to strip hidden characters.

I agree with Eric, I have had to do this many times when using ctrl+c / ctrl+v
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA
User 2572511 Photo


Registered User
5 posts

Hi everyone.

Many thanks for all of your reply's, much appreciated.

I did as Frank suggested, first I manually copied the first 4 lines and pasted into Notepad++ and then ran the macro and CTRL+V that into Notepad++.

With View > Show Symbol > Show All Characters it shows that both are identical to each other and have the symbols CR LF at the end of the rows. It is beyond my knowledge to know what that means.

I then tried what Eric & Steve suggested: I first manually copied the first 4 lines and pasted into Notepad (windows notepad that is) and then CTRL V into HTML Editor and it worked fine, the missing first row was also copied. I did the same using the macro and it worked, the missing first row was there.

I then tried just a manual CTRL C on the cell that the macro/coffecup wont paste which is Cell B1. I just clicked on that cell, CTRL C, and CTRL V in HTML Editor. It copied and pasted just fine.

I then tried something else, I put the tag <!DOCTYPE html> at the beginning of the data in Cell B1 and ran the macro again, then CTRL V in HTML Editor and it pasted fine.

This raises more questions for me and I really need to nail this down as a issue with HTML Editor or is it a Excel issue?
User 38185 Photo


Ambassador
25 posts

I typically perform all of my copy-and-paste operations by pasting to Notepad first, then repeating the copy-and-paste operation. Coffeecup's HTML Editor does the best job of handling some Unicode characters I've often had problems with (single & double quotes, double dashes).

Still, I'd love to see them implement a "Paste as plain text" option in the editor. That would just be super awesome.
User 187934 Photo


Senior Advisor
18,025 posts

It's not an issue as the copy and paste works as expected. Once your aware of the hidden characters it's not hard to clear them out.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personnel site used for testing and as an easy way to share photos.(RLM imported to RSD)
http://ericrohloff.com
http://ericrohloff.com/property/
User 2572511 Photo


Registered User
5 posts

But that is not what is happening here Eric.

As copying into Notepad++ showed, there are no hidden characters and as I said above, if I just click on cell B1 (the one that is not being posted into HTML editor) then that will CTRL V into HTML Editor just fine.

As far as I can tell, with my limited knowledge, the problem is with HTML Editor...:mad:
User 10077 Photo


Senior Advisor
973 posts

KENNETH GREEN wrote:
As far as I can tell, with my limited knowledge, the problem is with HTML Editor...:mad:

It's not a problem with either Excel or HTML Editor. They are two different programs and you are trying to join them with a macro. It would be unfair to characterize either of them as wrong because they are not intended to naturally work together.

KENNETH GREEN wrote:
I then tried just a manual CTRL C on the cell that the macro/coffecup wont paste which is Cell B1. I just clicked on that cell, CTRL C, and CTRL V in HTML Editor. It copied and pasted just fine.

If I am understanding you correctly, the copy-paste works fine manually, but it does not with the macro. If it works manually, then it means that HTML Editor will take a paste command "just fine" as you state above.

On the other hand, with the macro, it does not work properly. That makes me think that the problem lies within the macro. Somehow, the macro is doing something different than just a copy and paste. I don't know what that would be, but it's not just doing a copy-paste, because a straight copy-paste works (if I understood correctly).
Brian

Want personal and specialized help with RLM, RSD or with converting your VSD (or other) site to RLM/RSD? Email me at cchelp@uscni.org or call 865-687-7698.
User 10077 Photo


Senior Advisor
973 posts

Two thoughts that might provide a solution:

1. You might download a trial of the latest version of HTML Editor and see if it works there. If so, then you have your fix.

2. I use Excel quite a bit. I'm no power user (it sounds like you are more advanced than me), but I've found that if something won't work one way, I can often find another way to accomplish what I want.

Can you share the reason you need HTML Editor to accept a copy-paste from a macro in Excel? Perhaps we can brainstorm another way to make it work.
Brian

Want personal and specialized help with RLM, RSD or with converting your VSD (or other) site to RLM/RSD? Email me at cchelp@uscni.org or call 865-687-7698.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.