<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>ExcelToJSON</AppTitle>
	<AppShortName>MyApp</AppShortName>
	<Author>Asmat Qatea</Author>
	<Version>1.0</Version>
	<DesignDeviceName>Desktop</DesignDeviceName>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>640</PageWidth>
	<PageHeight>480</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<ResponsiveSize>False</ResponsiveSize>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<AppIcon>C:\Users\asmat\Documents\VisualNeoWeb\Libraries\img\default-icon.png</AppIcon>
	<CustomCSS>#JSONlog span {
padding:2px 5px;
background:#227447;
color:white;
border-radius:5px;
}

.select{
user-select:none;
}

.flexCenter{
display:flex;
justify-content:center;
align-items:center;
}

.flexSpacebetween{
display:flex;
align-items:center;
justify-content:space-between;
}

.flexRight{
display:flex;
justify-content:flex-end;
align-items:center;
}

.flexLeft{
   display:flex;
   align-items:center;
   justify-content:flex-start;
}

.flexMenu{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-content:flex-start;
}

.boxShadow {
  box-shadow:
  0 2.8px 2.2px rgba(0, 0, 0, 0.034),
  0 6.7px 5.3px rgba(0, 0, 0, 0.048),
  0 12.5px 10px rgba(0, 0, 0, 0.06),
  0 22.3px 17.9px rgba(0, 0, 0, 0.072),
  0 41.8px 33.4px rgba(0, 0, 0, 0.086),
  0 100px 80px rgba(0, 0, 0, 0.12)
}</CustomCSS>
	<LanguageCode>en</LanguageCode>
	<DisplayMode>standalone</DisplayMode>
	<ServiceWorker>Offline page</ServiceWorker>
	<ThemeColor>#000000</ThemeColor>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="pasteEventExcelToJSON">
					<Code>document.getElementById(&apos;myTextArea&apos;).addEventListener(&apos;paste&apos;, (event) =&gt; {
    let paste = (event.clipboardData || window.clipboardData).getData(&apos;text&apos;);
    let content = paste.trim().replace(/[\r]/g, &quot;&quot;).split(&quot;\n&quot;);
    let tableArray = [];
    let headerText = content[0].split(&quot;\t&quot;);

    for (i in content) {
        var item = {};
        if(i==0){continue}; //header part
        for(j in headerText){
            item[headerText[j]] = content[i].split(&quot;\t&quot;)[j];
        }
        tableArray.push(item);
    };
    console.log(tableArray);
    $App.myArray = tableArray;
});

</Code>
					<ScriptLanguage>JavaScript</ScriptLanguage>
				</Function>
				<Function name="saveFileToJSON">
					<Code>var beta = JSON.stringify(data, null, 4);
var a = document.createElement(&apos;a&apos;);
a.setAttribute(&apos;href&apos;, &apos;data:text/plain;charset=utf-8,&apos;+encodeURIComponent(beta));
a.setAttribute(&apos;download&apos;, fileName+&apos;.txt&apos;);
a.click()</Code>
					<Params>data|STRING|data;fileName|STRING|fileName</Params>
					<ScriptLanguage>JavaScript</ScriptLanguage>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="NewPage">
					<style>background-color: #fed009</style>
					<pageenter>pasteEventExcelToJSON

</pageenter>
					<Components>
						<Container id="box">
							<left>14px</left>
							<top>68px</top>
							<width>80%</width>
							<height>50px</height>
							<style>background-color:#fff;border-radius:5px;max-height:50px;min-height:50px</style>
							<align>top</align>
							<margin_left>10%</margin_left>
							<margin_top>15px</margin_top>
							<css_class>boxShadow flexCenter</css_class>
							<Components>
								<Container id="Container130">
									<left>0px</left>
									<top>12px</top>
									<width>36px</width>
									<height>36px</height>
									<style>background-color:#fff</style>
									<align>top</align>
									<css_class>flexCenter</css_class>
									<html>&lt;svg transform =&quot;scale(1.5)&quot; fill=&quot;#217346&quot;  style=&quot;width:24px;height:24px&quot; viewBox=&quot;0 0 24 24&quot;&gt;
    &lt;path d=&quot;M21.17 3.25Q21.5 3.25 21.76 3.5 22 3.74 22 4.08V19.92Q22 20.26 21.76 20.5 21.5 20.75 21.17 20.75H7.83Q7.5 20.75 7.24 20.5 7 20.26 7 19.92V17H2.83Q2.5 17 2.24 16.76 2 16.5 2 16.17V7.83Q2 7.5 2.24 7.24 2.5 7 2.83 7H7V4.08Q7 3.74 7.24 3.5 7.5 3.25 7.83 3.25M7 13.06L8.18 15.28H9.97L8 12.06L9.93 8.89H8.22L7.13 10.9L7.09 10.96L7.06 11.03Q6.8 10.5 6.5 9.96 6.25 9.43 5.97 8.89H4.16L6.05 12.08L4 15.28H5.78M13.88 19.5V17H8.25V19.5M13.88 15.75V12.63H12V15.75M13.88 11.38V8.25H12V11.38M13.88 7V4.5H8.25V7M20.75 19.5V17H15.13V19.5M20.75 15.75V12.63H15.13V15.75M20.75 11.38V8.25H15.13V11.38M20.75 7V4.5H15.13V7Z&quot; /&gt;
&lt;/svg&gt;</html>
								</Container>
								<TextInput id="myTextArea">
									<left>113px</left>
									<top>10px</top>
									<width>60%</width>
									<height>36px</height>
									<style>box-shadow:none</style>
									<align>top</align>
									<margin_left>8px</margin_left>
									<margin_right>8px</margin_right>
									<variable>[myInput]</variable>
									<place_holder>Copy from Excel &amp; paste here...</place_holder>
									<change>.filterList &quot;tag1&quot; &quot;menu4&quot;</change>
								</TextInput>
								<Container id="Container2">
									<left>84px</left>
									<top>13px</top>
									<width>36px</width>
									<height>36px</height>
									<style>background-color:#fff</style>
									<align>top</align>
									<hover>background-color:#F1F1F1;border-radius:8px</hover>
									<css_class>flexCenter</css_class>
									<html>&lt;svg style=&quot;width:24px;height:24px&quot; viewBox=&quot;0 0 24 24&quot;&gt;    &lt;path fill=&quot;currentColor&quot; d=&quot;M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;</html>
									<click>SetVar [myInput] &quot;&quot;</click>
								</Container>
							</Components>
						</Container>
						<Container id="JSONlog">
							<left>13px</left>
							<top>67px</top>
							<width>80%</width>
							<height>200px</height>
							<style>background-color:#fff;border-radius:5px;padding-bottom:6px;padding-left:6px;padding-right:6px;padding-top:6px;overflow-y:auto</style>
							<align>top</align>
							<margin_left>10%</margin_left>
							<margin_top>5px</margin_top>
							<margin_bottom>0px</margin_bottom>
							<hover>overflow-y:auto</hover>
							<css_class>boxShadow</css_class>
							<html>&lt;span&gt;Output:&lt;/span&gt; &lt;br&gt;
[myArray]</html>
						</Container>
						<Container id="Container5">
							<left>72px</left>
							<top>294px</top>
							<width>80%</width>
							<height>50px</height>
							<style>background-color:#fff;border-radius:5px;padding-left:8px;max-height:50px;min-height:50px</style>
							<align>top</align>
							<margin_left>10%</margin_left>
							<margin_top>5px</margin_top>
							<css_class>boxShadow flexLeft</css_class>
							<Components>
								<Container id="Container4">
									<left>23px</left>
									<top>15px</top>
									<width>80px</width>
									<height>36px</height>
									<style>color:white;font-family:my-font-san;background-color:#0076fc;border-radius:6px;padding-right:5px;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.034), 0 6.7px 5.3px rgba(0, 0, 0, 0.048)</style>
									<align>top</align>
									<margin_left>7px</margin_left>
									<margin_right>7px</margin_right>
									<hover>background-color:#006ce2</hover>
									<css_class>select flexCenter</css_class>
									<html>&lt;svg style=&quot;width:24px;height:24px&quot; viewBox=&quot;0 0 24 24&quot;&gt;    &lt;path fill=&quot;currentColor&quot; d=&quot;M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
&amp;nbsp;
Save</html>
									<click>GetObjectHTML &quot;fileName&quot; [fileName]
saveFileToJSON &quot;[myArray]&quot; &quot;[fileName]&quot;</click>
								</Container>
								<Container id="Container1">
									<left>397px</left>
									<top>7px</top>
									<width>108px</width>
									<height>36px</height>
									<style>color:black;font-family:my-font-san;border-radius:6px;padding-right:5px;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.034), 0 6.7px 5.3px rgba(0, 0, 0, 0.048)</style>
									<align>top</align>
									<margin_left>7px</margin_left>
									<margin_right>7px</margin_right>
									<css_class>select flexCenter</css_class>
									<html>FileName:</html>
									<click>saveFileToJSON &quot;[myArray]&quot; &quot;MyJSONArray&quot;</click>
								</Container>
								<Container id="fileName">
									<left>117px</left>
									<top>15px</top>
									<width>108px</width>
									<height>36px</height>
									<style>color:white;font-family:my-font-san;background-color:#0076fc;border-radius:6px;padding-right:5px;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.034), 0 6.7px 5.3px rgba(0, 0, 0, 0.048)</style>
									<align>top</align>
									<margin_left>7px</margin_left>
									<margin_right>7px</margin_right>
									<hover>background-color:#006ce2</hover>
									<css_class>select flexCenter</css_class>
									<neo_custom>contentEditable=&quot;true&quot;</neo_custom>
									<html>myJSONFile</html>
								</Container>
							</Components>
						</Container>
						<Container id="Container3">
							<left>228px</left>
							<top>439px</top>
							<width>204px</width>
							<height>34px</height>
							<css_class>flexCenter</css_class>
							<html>Author: Asmat Qatea</html>
						</Container>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>640px</width>
							<height>480px</height>
							<close_button>False</close_button>
							<kind>custom</kind>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
