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
Murali Kris
1.5k
254
48.4k
How to Read Content from Ms word
Jan 7 2019 1:34 AM
Hi All,
As per requirement as of now i can read content(text) from .txt file using java script.yes i can format text after reading, here text is fixed formating using script, working fine now.
To make dynamic changes User want to read Ms word file but user/client want read content from MS word. Since ms word is allows text formatting. they will make some changes like alignment, font size, font-family etc..
as usally i replaced ms word file to read, displaying content some wrong character symbols.
Reading .txt file using java script. as expected output is below.
Google LLC is an American multinational technology company that specializes in Internet-related services
Same text from word. But reading MS word file using JavaScript. output is below.
PK?!NU"""x("[Content_Types].xml ""("""KN"@"""%"!"""B%"`;"8""C3Ngc"""NB
how to read text from Ms word.
Kindly help me here.
This is the script i am using to read content.
<script src="/jquery-3.3.1.min.js"></script>
<script>
window.onload = function () {
getFile()
}
function getFile() {
debugger;
var fileTobeRead = "/Document.docx";
$.ajax({
type: "GET",
url: fileTobeRead,
dataType: "text",
success: function (data)
{
$('#divFileData').html(data)
},
error: function (request, status, error)
{
alert(error);
}
});
}</script>
Reply
Answers (
2
)
How to integrate an editor/compiler in a wordpress website
Refresh Only the Link not a page or map,Can any one?