Hello everyone, I need your help.
I have this table in excel:
I want to export each "ID" as a file name, each "subject" to be between <title></title> and each "body" as content of the html file. If there is no <title></title> inside "Body" then I have to create it. If there is content inside
<title></title>, then it should be replaced with the content from "subject" column
So the files will be:
file1.html
<title>Title1</title>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
----------------------------------------------------------------------------------------------------------------------------------------------------
file2.html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Title2</title></head><body><table>test1</table></body></html>
----------------------------------------------------------------------------------------------------------------------------------------------------
file3.html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Title3</title></head><body><table>test1</table></body></html>
Hope you can help me
Thanks a lot
I have this table in excel:
ID | Something Else | Subject | Body |
file1 | random | Title1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
file2 | random | Title2 | <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Title_Test</title></head><body><table>test2</table></body></html> |
file3 | random | Title3 | <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title></title></head><body><table>test3</table></body></html> |
I want to export each "ID" as a file name, each "subject" to be between <title></title> and each "body" as content of the html file. If there is no <title></title> inside "Body" then I have to create it. If there is content inside
<title></title>, then it should be replaced with the content from "subject" column
So the files will be:
file1.html
<title>Title1</title>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
----------------------------------------------------------------------------------------------------------------------------------------------------
file2.html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Title2</title></head><body><table>test1</table></body></html>
----------------------------------------------------------------------------------------------------------------------------------------------------
file3.html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Title3</title></head><body><table>test1</table></body></html>
Hope you can help me
Thanks a lot