How to print an embedded iframe in html page from OneDrive (excel file)?

Payam Taherirostami 0 Reputation points
2024-01-04T20:25:10.6866667+00:00

I'm trying to embed one sheet of my excel workbook in to a HTML page from OneDrive.
when I try to print the page (ctrl+p) the content of frame is not showing and does not getting printed. Here are the code and the pictures of what I'm expecting to have and what I'm getting.Capture

Capture

<!DOCTYPE html>
<html>
  <head>
    <title>Packing List</title>
  </head>
  <script>
    function print(){
    }

  </script>
  <body>
    <div ><button id="p" onClick="print()">Print </button></div>
    <div  id="iframe">
      <iframe
        width="1100"
        height="660"
        frameborder="0"
        scrolling="no"
        src="mySrc"
      >
	</iframe>

  </body>
</html>
Windows for business | Windows Client for IT Pros | Devices and deployment | Set up, install, or upgrade
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | OneDrive | For business | Windows
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.