Home How to read image from Hosted Server and display in Excel file
Reply: 0

How to read image from Hosted Server and display in Excel file

ViKu
1#
ViKu Published in 2017-11-10 07:11:44Z

I'm Developing a website in MVC Razor view. There I have provided option of downloading the Excel file. And its is working fine. I just need to attach an image at the top of excel file. I have published in localhost the image is showing, whereas from other system image not showing only content is showing, below is my code.

<table>
    <tr>
        <td></td>
        <td height="50">
            <img src="@Context.Server.MapPath("~/Images/company_logo1.png")" />
        </td>
    </tr>
    <tr>
        <td></td>
        <td align="center">
            <h3>Mini Statement</h3>
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <table cellspacing="1">
                @foreach (JProperty s1 in Model.DownloadData.SelectToken("MiniAccDet"))
                {
                    <tr>
                        <td colspan="2">@s1.Name</td>
                        <td style="mso-number-format:@myVariable;" font-weight:bold;" align="left">@s1.Value.ToString()</td>
                    </tr>
                }
                @foreach (JProperty s2 in Model.DownloadData.SelectToken("MiniStmtBal"))
                {
                    <tr>
                        <td colspan="2">@s2.Name</td>
                        <td style="font-weight:bold;" align="left">@s2.Value</td>
                    </tr>
                }
            </table>
        </td>
    </tr>
</table>
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.29973 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO