embedded excel worksheet in html shows extra whitespace - html

I am trying to embed an excel workbook into a webpage, but there is blank space on the top of the Excel.
Below code was copy/paste from the Excel application menu: Excel > share > embed
iframe width="100%" height="75%" scrolling="no" src="</path/to/shared/excel/>?sourcedoc={e8b1794e-ff53-4323-aa69-4d6b336b8e36}&action=embedview&wdAllowInteractivity=False&ActiveCell='Sheet1'!A1&wdInConfigurator=True&wdInConfigurator=True&edesNext=true&edrtees6=false&resen=false&ed1JS=false"></iframe>
Below is a sample of the output where you can see the whitespace:
When I inspect the iframe I see there is an element AppHeaderPanel.
I tried setting the display of that panel to none:
document.getElementById('AppHeaderPanel').style.display = "none"
This does get rid of the whitespace but then it adds the same amount of space to the bottom of the iframe and that looks just as bad.
How can I get rid of this whitespace/header the right way?

Related

How to export pdf or send e-mail that contains html including borders?

I have a website that displays data with some html and the data that is displayed on the webpage has borders as it is contained in a container-fluid with bootstrap. My problem comes when I export the page as a pdf, or try to send the html as it is in an email. When I look at the pdf file that comes from the site, it has all of the contents of the different rows and columns, but there is no shape or borders for any of the cells that show up on the site.
Does this have something to do with the fact that the original way that the data is displayed on the website is using a bootstrap container rather than a table? The data is not currently set up as an html table as the fields of the data that I show on the website are set up in a specific way. Is there any way to keep this format in the export?
Here's what my page roughly looks like. Each of the cells holds data, but I want to be able to see the data as well as the borders of the cells when I export this as a pdf. As it is, I only see the contents of the cells but no borders or formatting.
Also, here is the function I'm using to export as a pdf:
function exportPDF() {
var divToPrint=document.getElementById("content");
newWin= window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
Often the borders are CSS formatted. Meaning that if you have a separate piece of code that contains the CSS styling, outside of the "content" div this will have no effect in your export. Could you check if this is the case? Perhaps you can add the CSS styling directly into the HTML code like this example:
<h1 style="color:blue;">A Blue Heading</h1>
Best regards

Redirecting to the perticular section when click on the textbox?

I have created few forms and one pdf preview for this, whenever anyone will going to fill that form pdf preview will get updated with respect to it and after filling all the forms we can take pdf of it.
I want to be shown the particular section is getting updating (like changing the background color or underline it) on right side
when you giving the input on particular text box.
Please find the live code at http://ibus.proserindustries.com/
Posting this answer from the comment.
$("#propertytubelight").keyup(function() {
$("#propertytubelight1").text($("#propertytubelight").val());
document.querySelector("#propertytubelight1").scrollIntoView({ behaviour: "smooth", block: "nearest", inline: "start" });
});
This uses scrollIntoView method to scroll the input field with it's linked html element

Full PDF view will not getting due to adding vertical scrollbar?

I have created few forms and one pdf preview for this, whenever anyone will
going to fill that form pdf preview will get updated with respect to it and after filling all the forms we can take pdf of it.
After i adding the vetical scrollbar to this pdf preview and going to take pdf by clicking on preview and download button i will not get full page pdf because of adding this vertical scrollbar.
please find the functionality at http://ibus.proserindustries.com/
I want to be kept this vertical scrollbar and also want to display full page on pdf how can we achieve it ?
maybe it helps to you just remove from style overflow x, y and max height before the Popup
$('#printbutton').click(function() {
$('.printable').css('overflow', 'auto');
$('.printable').css('max-height', '100%');
Popup($('.printable')[0].outerHTML);
function Popup(data) {
window.print();
return true;
}
});

SSRS-Handling different headers based on page number

Here is the similar imageI'm trying to create an SSRS report using SSRS 2008 R2.
I have a requirement to show different headers in different pages based on page number. For example, I need two textboxes to be shown in all the pages except page-1. So I put them in a rectangle inside report header and set the visibility(expression) based on pagenumber.
This works fine but it leaves a lot of white space in the first page header as it is hidden. How can I get rid of the whitespaces?
I tried putting those 2 textboxes out of the header, but I'm unable to hide them based on pagenumber, as the pagenumber global variable can be accessed only in header and footer but not from the body.
Is there any other approach to hide these textboxes on first page and show on all other pages?
Thanks in advance.
Update: added similar image
You can't recover the space in the header but you can not use it in the first place and let the text box grow when necessary. The bad part is that when it is exported to Excel, all the text will be in one cell.
Since your text is different sizes, you'll need to use HTML formatting.
In your regular header, add the page formula you are using with the TRUE part containing the text needed for your additional info and the FALSE part with an empty string - "". Use the <br> tag for a page break and the <font> tag to set the size.
="<b>This is My Page Header</b>" & IIF(Globals!PageNumber > 1, "<br><font size = '2'>Text Box 1" & "<br>" & "TextBox 2" & "<font>", "")
You'll need to set the Placeholder properties to Interpret HTML tags.

Truncating HTML 'Browse' filename

I have a separate PHP file containing the logic and form code for an upload script I written. I have included it into a div on my admin page and I have it set to float: right. However, when I select a file with an exceptionally long filename, it pushes the entire form away from the right hand side of the page and I wish to be able to truncate it. I have tried variants of overflow: hidden and text-overflow: ellipsis but can't get it to shorten as it's a part of the HTML browse form.
e.g.
Original:
01123581321345589144.jpg
Truncated:
0112358...
Thanks in advance