Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New line characters in help for a function argument #121

Open
PGS62 opened this issue Oct 31, 2022 · 2 comments
Open

New line characters in help for a function argument #121

PGS62 opened this issue Oct 31, 2022 · 2 comments

Comments

@PGS62
Copy link

PGS62 commented Oct 31, 2022

I'm using Excel-DNA Intellisense for VBA functions, which involves providing a worksheet named _Intellisense_. All works great, though I find that new line characters (ascii 10) in the "argument help" have no effect in the intellisense popup. I've tried using ascii 13 and the html tag <br> to no avail.

Is this something that could be fixed?

To illustrate, here's help for a function that parses a .csv file to an array. In the image below, I show the intellisense that I'm able to achieve (on the left) versus what I would like to achieve (with line feeds, mocked up on the right).
image

@govert
Copy link
Member

govert commented Oct 31, 2022

@PGS62 I see what is happening. When you edit a cell to add a new line (with Alt+Enter) then Excel puts only a newline (ASCII char 10) into the line. But the Excel-DNA IntelliSense is splitting the lines using the standard Windows newline sequence, with both a carriage return and a newline (ASCII 13 & 10).
You can get string with these delimiters into the cell with a formula like

="My first line" & CHAR(13) & CHAR(10) & "and then the next line" & CHAR(13) & CHAR(10) & "and the rest"

It displays the same in the cell as the newline only, but now the Excel-DNA processing will pick up and display the extra lines.

It's probably worth updating the IntelliSense to also accept the newline characters alone.

@PGS62
Copy link
Author

PGS62 commented Oct 31, 2022

Yes, tweaking things so that newline in isolation works would be sensible. But many thanks for giving me an immediate solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants