I have a small application built in Excel 2010 with cell functions plus some vba subs and a vba function that is called in worksheet cells.
One column has a formula in each cell that builds a hyperlink using a base URL, variable part, fixed part, variable part.
Works great, until...
I save the print area to PDF using the inbuilt functionality in Excel 2010.
The generated PDF shows hyperlinks that look OK but the link actually only takes you to the first part of the concatenated URL (the base URL).
Eg this link:
https://www.support.unisys.com/common/epa/macro.aspx?path0=a-s&path1=ple&path2=web-select&SELECT=PLE-PLE-TO-IC+eq+MCP-054.1A.117&TITLE=PLE(s)+released+since+IC:+MCP-054.1A.116
Would be generated by the following formula:
=HYPERLINK(CONCATENATE("https://www.support.unisys.com/common/epa/macro.aspx?path0=a-s&path1=ple&path2=web-select&SELECT=PLE-PLE-TO-IC+eq+",D1,"&TITLE=PLE(s)+released+since+IC:+",C1))
The saved PDF displays the hyperlink label as:
https://www.support.unisys.com/common/epa/macro.aspx?path0=a-s&path1=ple&path2=web-select&SELECT=PLE-PLE-TO-IC+eq+MCP-054.1A.117&TITLE=PLE(s)+released+since+IC:+MCP-054.1A.116
But the actual link takes you to:
https://www.support.unisys.com/common/epa/macro.aspx?path0=a-s&path1=ple&path2=web-select&SELECT=PLE-PLE-TO-IC+eq+
Any ideas how to get it to create the correct hyperlink in the PDF? Or is this a Microsoft bug(or Adobe)?
Regards,
Graham
So, turns out that I needed to select Ignore Print Areas on the PDF options dialog, to avoid lines being inserted during the conversion, because of the really long URL.
I also had to amend commas in the URL to be URL encoded (%2C) to truncation on the comma in the PDF.
See link below where I got the Ignore Print Areas nugget:
http://answers.microsoft.com/en-us/office/forum/office_2010-excel/excel-2010-concatenated-url-broken-when-saved-to/940ff1f5-fbdb-4875-a4f7-536b615e6df2
Related
Update: It works fine in Microsoft Online. It also works for other websites from the desktop version of Excel. I have contacted the iDox vendor.
I used a nested Hyperlink(Concat()) formula in Excel 2016 to create a column that changes a dynamic URL based off of another column in my table. The URL is 238 characters, so the conversion does not generate an error. However, if I click the hyperlink in Excel, it takes me to the search page, not the search results, yet copying and pasting the URL into the browser or following the link from Google Sheets it works fine.
I also tried copying and pasting the results into text and converting to url again, but still could not open from Excel. Did I skip a step that prevents Excel from properly opening the URL? Ideally, a solution will not use VBA or Macros.
=HYPERLINK(CONCAT("http://idox:8080/idox/searchresults.jsp?advanced=false&collectionId=2&libraryId=15&field_parcelnumber=&field_saledate=&field_buyername=&field_sellername=&field_property_street=&field_alternateid=&field_sdf_id=",[#[SDF ID]],"&search=Search"))
I am trying to export an Excel file (.xlsx) to a csv, with LibreOffice. Some columns have hyperlinks, which I can open when the sheet is open in LibreOffice. The cell does not show the link, but a short summary text: the link is somehow a property of the cell (or the text, not sure).
I would like that the CSV contains the links for the affected columns (I don't care about the short summary text), but by doing a "Save As csv" I am losing the links. What can I do?
EDIT
I have investigated a bit: the hyperlink can be manually created in Libreoffice in a cell with Ctrl-K or from the menu Insert -> Hyperlink. When I try to export the csv, I am offered two relevant options:
save cell content as shown
save cell formulas instead of calculated values
I have played around with them, but those are not helping at all.
Is there any way of exporting the hyperlinks instead of the text?
From what I can tell, the CSV export filter always saves the link text, not the link URL. This behavior occurs when saving from LibreOffice format as well, so your question does not need to involve Excel or the .xlsx format.
What I would probably do is write a macro to create a CSV file with the URLs. If you want to try that, then have a look at https://wiki.openoffice.org/wiki/Documentation/DevGuide/Accessibility/XAccessibleHyperlink.
Depending on what you are trying to do and how much time you are willing to invest, you can create your own filter.
Another option that requires programming would be to use the HTML export filter, which saves both the link text and link URL, and then write some code to parse out the URL.
My client receives an email with a one-time-access url each day (it can only be accessed once, and only on that day).
Content from this url is plain text formatted as a .csv (actually tilda sv) file, but that is not of relevance here.
The content is then (manually) copied and pasted into Excel sheet, where some (formatting) macros are applied (to get rid of tildas and put data into cells).
Also, few of the first rows of the content are irrelevant, i.e. only lines 5-end are copied into Excel.
My question is the following - is it possible to write a VBA in Outlook to
open the url provided in the given email
copy the content from the webpage (and remove those first couple of lines)
open Excel and paste it there (and apply formatting afterwards)
I found some answers on how to copy/paste content from the email itself into Excel sheet, but didn't manage to sort out how to do it from a url/webpage.
Yes it is possible
I am not expert on VBA, but I do little programing to reduce daily task
I can show you the steps:
create rule that triggers VB script when email arrives.
In the VB script in the outlook, write code that would open excel
pass the connection string
set the R1C1 as destination cell
Save the file as date variant .xls
Make sure outlook is open. This would not work if outlook is not open
[SOLVED (see answer below)] I am using SpreadsheetWorker API to make working with Open XML SDK 2.0 easier. I have an excel spreadsheet that I use as a template when I generate new excel spreadsheets through SpreadsheetWorker. I am getting a "found unreadable content" error when I open my generated files, and excel will correct the problems with the file if you allow it. This is not suitable for production.
While adding hyperlinks to excel cell, try to avoid dynamic URL to screenTip attribute. Excel cell takes only 256 charecter long for tooltip. The repaired excel file chops off the characters after this limit.
For Spreadsheet gear,
worksheet.Hyperlinks.Add(worksheet.Cells[startRow, startColumn], href, null, "Click here to see details","textToDisplay");
Solved my own question: In my excel spreadsheet that I used as a template, I had some blank cells with 'Hyperlink' styles applied to them. Setting the style of these cells to 'Normal' fixed the problem, and I no longer get the "unreadable content" error when I open generated spreadsheets for the first time.
I am trying to use a VBA macro (for Office 2003) to do the following:
In Excel, the user will select a range of cells
In Word the user will call the macro (via a button or shortcut) to insert the selected Excel range as an embedded object
The code is not the problem so far, my problems are:
Given that the user is working in a Word document, most likely will use the same fonts in Excel
When Excel range was inserted in Word and they both use the same font names and sizes, they look different inside Word ( fonts look as if they stretched a bit)
Styling Cell borders in Excel is not like styling cell borders in Word
I do appreciate any advice on this regards
When you paste as an Excel Worksheet Object, what Word is actually displaying is an image created by Excel. Notice that you can't select any text, for example. Word appears to be distorting the image ever so slightly, so that the fonts won't line up.
Edit: I can't speak for Office 2003, but Office 2007 defaults to the HTML format using PasteExcelTable. The exact macro statement is
Selection.PasteExcelTable False, False, False
This will give formatting that is compatible with Word, but unfortunately the data is not live and won't get updated as the spreadsheet is changed. If your requirements don't include live update, try this method.
Is it possible to have the macro creating a table out of the cells (as normally happens when you manually copy them), rather than inserting an Excel Object.
The best visual results results can be achieved by using Selection.CopyPicture(Appearance, Format); however, you will not be able to edit the data inside Word as you will only get a picture.