TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammad qasim
NA
408
0
border not showing export Html to word
Apr 28 2020 3:19 PM
Hi,
I am exporting Html table into Doc.
Eporting fine, but format is not like as I design on html.
Html Look
After exporting showing like this
My Code
<table id=
"tblexportword"
border=
"1"
style=
"width: 100%;"
>
</table>
<button
class
=
"ExportToWord"
>Export To Word(.doc) </button>
<script type=
"text/javascript"
>
$(
function
() {
$(
".ExportToWord"
).click(
function
(event) {
$(
"#tblexportword"
).wordExport();
});
});
function
GenerateWordFile(response) {
var
nomenSplit = response[0][
"Nomenclature"
].split(
'/'
);
var
row =
"<tr> <td colspan='3' style='border:10px;text-align: center;'>"
+ response[0][
"Nomenclature"
] +
"</td></tr>"
;
row +=
"<tr> <td colspan='3' style='text-align: center;'>"
+ response[0][
"Title"
] +
"</td></tr>"
;
row +=
"<tr> <td rowspan='6' style='width:60%'> SEARLE </td> <td> Company Code </td> <td>"
+ nomenSplit[0] +
"</td> </tr>"
;
row +=
"<tr> <td> Plant Code </td> <td> "
+ nomenSplit[1] +
"</td> </tr> "
;
row +=
"<tr> <td> Document # </td> <td> "
+ response[0][
"Nomenclature"
] +
"</td></tr> "
;
row +=
"<tr> <td> Superseded # </td> <td> "
+ response[0][
"OldsopName"
] +
"</td></tr> "
;
row +=
"<tr> <td> Created Date </td> <td> "
+ response[0][
"Created"
] +
"</td></tr> "
;
row +=
"<tr> <td> Review Date </td> <td> "
+ response[0][
"Nomenclature"
] +
"</td></tr> "
;
$(
'#tblexportword'
).append(row);
$(
"#tblexportword"
).wordExport();
}
</script>
Kindly help to export it ,based on Html Layout ( with Border )
Thanks
Reply
Answers (
3
)
How to open Msword documnt in browsr usng 2016 onprem(Stand)
how can we restrict user not to delete records in excel shee