0 votes
in SoSci Survey (dt.) by s316871 (110 points)

I want to compare the headings of each column from the excel file to a pre determined list of the headings that I will provide in the PHP. So for example i want to see if heading of Column A in the excel file is "Hello" then does this come into So Sci as "Hello" or "104 101 108 108 111". I want to see whether all headings of the excel columns are the same as what I want otherwise I want an error to be shown to the user uploading the file, saying that the headings are not correct please fix them.
Please let me know if anything is unclear

by SoSci Survey (343k points)
Yes, anything is unclear :) Let's start with the basics. Where does the excel file come from? Are we talking about a file upload in the questionnaire by the respondent?
by s316871 (110 points)
Your answer : Yes exactly. The respondent will upload a Microsoft Excel file and this will be done via the "upload" type question.

Further details : I want to see if the headings in the excel file match the headings that I specify in the PHP code when checking the excel file headings.

1 Answer

0 votes
by SoSci Survey (343k points)

Okay, you're lucky, SoSci Survey got the new function uploadAsTable() in version 3.6.10. However, there's no manual for that at the moment, yet.

If your upload question has the ID "UP01" then you can get the content of an uploaded excel file via

$content = uploadAsTable('UP01');

This will be an array with one array per row. So given that you have a bit experience with PHP, you can easily check what the headline is like. If not, tell me how far you come, and we'll get this solved.

ago by s316871 (110 points)
Oh that's wonderful. Also, thank you for your prompt responses and really helpful replies. I am currently trying to implement the python code to solve my issue and will write here again if I run into some issues.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...