我需要创建模板并从.xls文档生成HTML [英] I need to create template and generate HTML from an .xls document

查看:72
本文介绍了我需要创建模板并从.xls文档生成HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

Hello All,

我发帖是为了获得方向感。

I'm posting to get a sense of direction.

我收到图像,xls文件,  然后需要将它们变成一个html。

I receive images, an xls file,  and then need to make them into an html.

html将只包含图像和链接/替换文字。

The html will just consist of images and links/alt text.

我想要使用C#。

.xls文件将包含项目信息,例如:alt文本,链接以及与项目关联的图片。

The .xls file will have the item info such as: alt text, the link, and the pictures that are associated with the item.

图片将在网格中组合在一起,他们真的只需要分配正确的链接,图像src和alt文本并再次相邻放置

Pictures will fit together in a grid , they really just need to be assigned the proper link, images src and alt text and placed next to each other again

请让我知道是否缺少任何细节。

Please let me know if any details are missing.

谢谢

-JG

推荐答案

嗨JG,

感谢您在此发帖。

如果您想以Html格式存储图片,可以使用以下方法。

If you want to storage the image in Html, you could use below method.

<!DOCTYPE html>
<html>
<body>

<h2>Spectacular Mountain</h2>
<img src="pic_mountain.jpg" alt="Mountain View" style="width:804px;height:428px;">

</body>
</html>

如果您想在后面的代码中访问Html元素。 这里有一个类似的解决方案供您参考。

If you want to access the element of Html in code behind.  here is a similar solution for you as reference.

如何在代码隐藏中检索HTML元素

如何从[封闭]后面的asp.net代码中访问html表单输入

你也可以使用
HtmlElement
GetAttribute
方法
(String)到r 获取元素上命名属性的值。

You also can use the HtmlElement.GetAttribute Method (String) to retrieve the value of the named attribute on the element.

Best 此致,

Best  Regards,

Hart


这篇关于我需要创建模板并从.xls文档生成HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆