Doria said the dead included two teachers and six students, and several more people had been hospitalized after sustaining injuries. The two gunmen killed themselves after the attack, police say.
The unidentified gunmen, who appeared to be between 20 and 25 years of age, shot and killed a worker at a nearby vehicle wash before their attack at the Raul Brasil school, police said.
He said it was not yet known whether the assailants were former pupils at the school.
School shootings are rare in Brazil, although the country is one of the world's most violent with more annual homicides than any other.
Far-right President Jair Bolsonaro made relaxing gun control a cornerstone of his campaign a year ago.
While gun laws are considered strict in Brazil, it is not hard to illegally purchase a weapon.
Players Championship odds, picks: Who's a good bet at golf's 5th major
The tournament had a March date until 2007 when it was moved to May. I may throw him into one GPP but I will be underweight on him. But the heart-stopping moments hadn't even started.
Facebook, Instagram suffer outages
Some Twitter users who work in "Facebook-centric" jobs, expressed their panic and distress at being unable to use the platform. On Wednesday's issue, Ms Brooker added on Twitter : "Look at what happens when we let one company control everything".
10 dead, including 6 children, in ‘unspeakably brutal’ shooting; 17 hurt
Sao Paulo Governor Joao Doria said as he stood outside the school that "our solidarity goes out to the families of the victims". Latin America's most populous nation has the largest number of annual homicides in the world, but school shootings are rare.
The deadly incident occurred on in the city of Suzano located in the southeastern Brazilian state of Sao Paulo on Wednesday.
While gun crime is common in Brazil, shootings of this nature are not.
Only secondary students were reportedly at the school at the time of the shooting.
Gonçalves, the housewife who lives nearby, gave safe harbor to several students, including one boy who was shot in the jaw.
The attack took place at around 9:30am during a recreation period for some students, authorities said. The motive for the shooting is not clear, police said. Investigators said they had a pact to die together in the attack although Globo TV, citing police, reported that Monteiro killed Castro, and then turned the pistol on himself. Castro's body lay near Monteiro's, with the crossbow on the ground between the pair.
São Paulo state governor João Doria tweeted that the victims had been "cruelly murdered".
"It's a very sad scene, the saddest thing I've seen in my entire life".