Hi,
I have to create multiple excel sheets within a single workbook. The purpose is to get the list of students who fall under a particular teacher. There will be sheets titles as [teacher name] and the name of respective students. But the challenge I am facing is that the format of the excel file is not in the right format. Right now I have the name of teacher and school appearing against each student which I don't want. I just need the name of teacher and school appear on top and below it I want the names of the students. Is this possible to do?
The screenshot of the current format and the desired format are also attached below:
#Load libraries
library(tidyverse)
library(janitor)
library(readxl)
# Split a master data into multiple excel sheets in a workbook ------------
assessment<-read_excel("Merged_master.xlsx")
#splitting data frame into multiple sheets on excel
school_wise_sheets<-assessment %>%
split(assessment_modify,f=assessment$teacher_name)
#export the split file into excel sheets
writexl::write_xlsx(school_wise_sheets,"School_wise_Sheets.xlsx")
Thanks for the code. This works as desired. But I am unable to do one thing. In my actual excel file, there are few parameters which comes as column titles. In extract_parts_2, I have added the columns required, but I am unable to understand what changes to bring in remake_3 data frame. The screenshot of the actual data is attached below along with the reprex.
step 3 is a bout making an empty structure; then filling it with identified parts. [row,column] positions are used.
when we want to stream all the non single entries; we need to know where they would fit.
I cant begin to tell you what to do, as you havent told me how to arrange it in the excel...
Thanks for the reply. I want the final output in excel as shown in the screenshot.
The school name and Teacher name comes correctly after the code is executed. But the columns from "reading_aloud" till "group_participation".