Importing Excel records on Filemaker Server using PSoS - excel

New to FileMaker server and have been trying to roll it out for my own company but running into a problem I can't seem to solve or find the right answers to online.
I am saving an excel file called import.xlsx in /Library/FileMaker Server/Data/Documents/ and using a variable filepath to point to the file this script does not work when used in PSoS step. However if I specify the file locally whilst using FMP, and using only the script "Import Test" the import works fine.
Is it a problem with the variable filepath I have set? Or have I missed something out? I have included the two scripts that I wrote to try and make the import happen via PSoS. Any help or advice would be greatly appreciated!! - Yong
Script to Trigger PSoS "Import PSoS Button"
Commit Records/Request
Perform Script on Server[ "Import Test" ]
Script to Import Records from Excel "Import Test"
Go to Layout [ "Test" (Test) ]
Set Variable [ $filepath ; Value: "filemac:" & Get(DocumentsPath) & "import.xlsx" ]
Import Records [ With dialog: Off ; Source: "$filepath"; Worksheet: "" ; Add; Mac Roman ]
UPDATE:
I have tried using a .csv file in the place of the .xlsx file and the script works perfectly. Still not sure why a .xlsx file doesn't work as it is stated that FileMaker server 15 supports .xlsx import records script step (http://help.filemaker.com/app/answers/detail/a_id/12067/~/import%2Fexport-script-steps-with-filemaker-server-scheduled-scripts)

You should not need to prepend the path with "filemac:" since the function gets the correct path. Can you try it without and see if that does it?

Just to update that I figured out what is wrong after all these time. Filemaker Server does support server side imports with .xlsx, what was going wrong was the file rights that is inside the /Library/FileMaker Server/Data/Documents/ folder. To have server side imports to work, you have to make sure that for the specific file .csv or .xlsx, you have to make sure that either (fmsadmin) or (fmserver User) has read rights to that file. Add it if it doesn't.
Can't believe it has taken me that long to figure that out. Not sure why this isn't documented anywhere. Hope it helps whoever else is facing this problem, cheers!
YS

Related

Excel file getting corrupted while downloading using PowerShell/Curl

I am trying to download an Excel file from Artifactory to my local machine using a PowerShell/Curl script. The Excel file is getting created, but when I open a sheet I am getting the below message and there is no data in this.
The file format and extension of 'DataSheet_DEP.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?
curl.exe -k -u artifactory_TEMP:Password16 https://../artifactory/../DataSheet_DEP.xls --output D:\ABC\Team Members\Datasheet\DataSheet_DEP.xls
Just to add Excel file is in 97-2003 workbook (.xls). I am able to download the file manually without any issue.
This is resolved now.. I was using wrong artifactory path. Thanks everyone who tried to help here

When using Pandas read_csv function, several cells trail off with "..." instead of having the full text. Any suggestions?

I saved an excel file into a CSV and uploaded it using Google Colab's file.upload().
from google.colab import files
uploaded = files.upload()
If I view "uploaded" it shows the full file. When I save it into a data frame using:
data = pd.read_csv(io.StringIO(uploaded["OilEx No Tickers.csv"].decode("utf-8")))
data returns
which is useless as the websites are cut off. They do not work in the function I am trying to run them through later as they aren't the full site. Any suggestions? Thank you.
The first time I faced this problem myself, I bookmarked PX0r's answer to this Stack Overflow question, which is to run this command, then re-display the DataFrame:
pd.set_option('max_colwidth', 800)
To reset this option to its default value without having to restart the kernel:
pd.reset_option('max_colwidth')
Some other useful commonly used options in the official docs: https://pandas.pydata.org/pandas-docs/stable/options.html#frequently-used-options

How To Upload Excel Data In Laravel?

I have problem with importing thousand data into phpMyAdmin. I do import and it just cause null. And I can't input it manually one by one. I need something helpful with that problem.
Thanks if you willing to help me.
As you named phpMyAdmin I guess the problem is importing to the database.
MySQLDumper can help you importing and exporting massive database files:
To use it:
Download it from this link: https://sourceforge.net/projects/mysqldumper/
Place the content inside your webspace. eg: the htdocs folder
Start the script in your browser (http://www.yourDomain.de/yourFolder/mysqldumper/). eg: localhost/mysqldumper
Follow the Installation assistent
From there you could import or export to an existent database or to a new one.
The solution is to enter it 200,200...:(with chunk)
Ex:
//path is the path of excel file uploaded ex: /excel/excel.xlx
Excel::filter('chunk')->load($path)->chunk(200, function($results)
{
});

Importing xlsx file with space in filename in Stata .do file

I am totally new to Stata and am wondering how to import .xlsx data in Stata. Let's say the data is in the subdirectory Data and has name "a b c.xlsx". So, from working directory, the data is in /Data
I am trying to do
import excel using "\Data\a b c.xlsx", sheet("a")
but it's not working
it's not working
is anything but a useful error report. For future questions, please report the exact error given by Stata.
Let's say the file is in the directory /home/roberto then
clear
set more off
import excel using "/home/roberto/a b c.xlsx"
list
should work.
If you are already in /home/roberto (which you can verify using display c(pwd)), then
import excel using "a b c.xlsx"
should work.
Using backslashes to refer to directories is not encouraged. See Stata tip 65: Beware the backstabbing backslash, by Nick Cox.
See also help cd.

Excel Object in asp.net

I have a serious issue.
I am using excel object for opening the excel file
it works fine i my PC.
when i make application as a website and running the page and uploading it gives the error "'C:\Documents and Settings\Administrator\Desktop\Work\SABRE MSO Mapping Request Template.xlsx' could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted. ".
I think it taking server path...but i want to open client excel file before saving the file to the server.
Plz help.
have you tried server.mappath() method ?? Do you have proper permissions setup to access the folder??
Are you passing complete file path to the excel for opening the file? Please try this:
if (fileUpload.HasFile)
{
string fileName = "PATH_RELATIVE_TO_YOUR_SITE" + "FILE_NAME";
fileUpload.PostedFile.SaveAs(fileName);
//NOW open excel using fileName;
}
also you need write permissions to the path (folder) you are writing file to.

Resources