Using xlwDotNet, I have created a simple function which returns one number. Sometimes, something goes wrong, and I am trying to propagate an exception message to Excel.
When i use throw new Exception("Message"), Excel just shows "System.Exception : " as the message back is sent on a number of lines and the message is cut off as the cell shows only the top line.
How to propagate the error message to Excel and disable all other text, i.e. to show just “Message” and not “System.Exception xxxxx” pls?
You should use
See my solution at http://jiripik.me/2012/06/17/project-financialdataforexcel and the source code at http://assembla.com/spaces/FinancialDataForExcel/wiki.